Date: 21 Jun 2001 22:43:02 +0200 From: Cyrille Lefevre <clefevre-lists@noos.fr> To: obrien@FreeBSD.ORG Cc: arch@FreeBSD.ORG Subject: Re: (FWD) Re: import NetBSD rc system Message-ID: <3d8tftt5.fsf@gits.dyndns.org> In-Reply-To: <20010620182320.D99923@dragon.nuxi.com> References: <20010620182320.D99923@dragon.nuxi.com>
next in thread | previous in thread | raw e-mail | index | archive | help
"David O'Brien" <obrien@freebsd.org> writes:
[snip]
> diff -ur /usr/src/etc/rc etc/rc
> --- /usr/src/etc/rc Fri May 11 12:06:55 2001
> +++ etc/rc Sat Jun 16 15:46:27 2001
> @@ -52,6 +52,39 @@
> PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin
> export HOME PATH
>
> +# If there is a global system configuration file, suck it in.
> +#
> +if [ -r /etc/defaults/rc.conf ]; then
> + . /etc/defaults/rc.conf
> + source_rc_confs
> +elif [ -r /etc/rc.conf ]; then
> + . /etc/rc.conf
> +fi
> +
> +case ${new_rc} in
> +[Yy][Ee][Ss])
maybe a check of the existance of /etc/rc.subr have to be done ?
> + . /etc/rc.subr
> +
> + _rc_conf_loaded=YES
> +
> + if [ "$1" = autoboot ]; then
> + autoboot=yes
> + _rc_fast_run=yes # run_rc_command(): do fast booting
> + fi
> +
> + files=`rcorder -s nostart /etc/rc.d/*`
> +
> + for _rc_elem in $files; do
> + run_rc_script $_rc_elem start
> + done
> +
> + exit 0
> + ;;
> +*)
> + # fall-through to the old rc scripts
> + ;;
IMHO, the above three lines aren't needed.
> +esac
> +
> # BOOTP diskless boot. We have to run the rc file early in order to
> # retarget various config files.
> #
> @@ -60,15 +93,6 @@
> if [ ${dlv:=0} != 0 ]; then
> . /etc/rc.diskless1
> fi
> -fi
> -
> -# If there is a global system configuration file, suck it in.
> -#
> -if [ -r /etc/defaults/rc.conf ]; then
> - . /etc/defaults/rc.conf
> - source_rc_confs
> -elif [ -r /etc/rc.conf ]; then
> - . /etc/rc.conf
> fi
>
> feed_dev_random() {
> diff -ur /usr/src/etc/rc.shutdown etc/rc.shutdown
> --- /usr/src/etc/rc.shutdown Sun Dec 17 00:15:57 2000
> +++ etc/rc.shutdown Sat Jun 16 15:46:32 2001
> @@ -52,6 +52,26 @@
> . /etc/rc.conf
> fi
>
> +case ${new_rc} in
> +[Yy][Ee][Ss])
> + . /etc/rc.subr
> +
> + files=`rcorder -k shutdown /etc/rc.d/*`
> + for i in $files; do # reverse order of files
> + nfiles="$i $nfiles"
> + done
> + files=$nfiles
> +
> + for i in $files; do
> + run_rc_script $i stop
> + done
> +
> + exit 0
> + ;;
> +*)
> + ;;
same assertion here.
> +esac
> +
> # Write some entropy so the rebooting /dev/random can reseed
> #
> case ${entropy_file} in
> ----------
see you.
Cyrille.
--
home: mailto:clefevre@redirect.to UNIX is user-friendly; it's just particular
work: mailto:Cyrille.Lefevre@edf.fr about who it chooses to be friends with.
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3d8tftt5.fsf>
