From: Sascha Wildner Date: Sun, 30 Aug 2009 09:19:28 +0000 (+0200) Subject: Fix registration issue in the devfs rc script. X-Git-Tag: v2.4.0~100^2~5 X-Git-Url: http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/5ee7b5984175637531e166e10827526e0df9ef47 Fix registration issue in the devfs rc script. rc.d/devfs is not controlled by an _enable variable so just register properly as being configured, so that later scripts indirectly depending on it will not fail when being started by rcrun(8). Reported-by: hasso While here, add some comments about the scripts purpose and print rules files as they are applied. --- diff --git a/etc/rc.d/devfs b/etc/rc.d/devfs index 1cee37d..8e4b39e 100644 --- a/etc/rc.d/devfs +++ b/etc/rc.d/devfs @@ -1,26 +1,30 @@ #!/bin/sh # +# Load default devfs(5) rules. +# # PROVIDE: devfs # REQUIRE: rcconf -# BEFORE: disks +# BEFORE: disks initrandom . /etc/rc.subr name="devfs" + load_rc_config $name -start_cmd="load_rules" -stop_cmd=":" +dummy_rc_command "$1" load_rules() { - echo "Loading devfs rules" + echo -n "Loading devfs rules:" set -- $devfs_config_files for file; do - [ -r $file ] && /sbin/devfsctl -a -f $file + [ -r $file ] && echo -n " $file" && /sbin/devfsctl -a -f $file done - } -load_rc_config $name -run_rc_command "$1" +case "$1" in +*start) + load_rules + ;; +esac diff --git a/etc/rc.d/rcconf b/etc/rc.d/rcconf index e5a7ad8..b33ecd0 100644 --- a/etc/rc.d/rcconf +++ b/etc/rc.d/rcconf @@ -6,7 +6,7 @@ # PROVIDE: rcconf # REQUIRE: initdiskless -# BEFORE: disks initrandom +# BEFORE: devfs . /etc/rc.subr dummy_rc_command "$1"