bgfsck vs. background-fsck

Miroslav Lachman 000.fbsd at quip.cz
Thu Jan 7 14:35:20 UTC 2010


Hi,
can somebody explain me, why /etc/rc.d/bgfsck is using hyphen in the 
name variable and the name is not consistent with name of the script nor 
rcvar?

/etc/rc.d/bgfsck:
name="background-fsck"
rcvar="background_fsck"
start_cmd="bgfsck_start"

bgfsck is the only one script using hyphen in the name and it is causing 
some problems with eval:

debug output for rc.d/bgfsck

+ eval '_chdir=$background-fsck_chdir' '_chroot=$background-fsck_chroot' 
'_nice=$background-fsck_nice' '_user=$background-fsck_user' 
'_group=$background-fsck_group' '_groups=$background-fsck_groups'
+ _chdir=-fsck_chdir _chroot=-fsck_chroot _nice=-fsck_nice 
_user=-fsck_user _group=-fsck_group _groups=-fsck_groups


debug output for rc.d/bgfsck

+ eval '_chdir=$sshd_chdir' '_chroot=$sshd_chroot' '_nice=$sshd_nice' 
'_user=$sshd_user' '_group=$sshd_group' '_groups=$sshd_groups'
+ _chdir='' _chroot='' _nice='' _user='' _group='' _groups=''

I think that variables should be empty in both cases. Am I wrong?

What is the reason to have hyphen in the name?

I found this problem when I tried to add cpuset support in to rc.subr (I 
will post about it later)

Miroslav Lachman


More information about the freebsd-rc mailing list