[BACK]Return to motd CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / etc / rc.d

File: [cvs.NetBSD.org] / src / etc / rc.d / motd (download)

Revision 1.3, Wed Jul 26 00:11:49 2000 UTC (18 years, 4 months ago) by lukem
Branch: MAIN
Changes since 1.2: +2 -2 lines

* add new dummy dependancy `NETWORK' to be REQUIREd by services which need
  networking to be operational before starting, and use as appropriate.
  NETWORK depends upon network and dhclient.
* move the guts of systemfs into mountcritlocal
* replace the dependancy on systemfs with mountcritremote, and remove the
* SERVERS now also depends upon ppp

* dhclient (and others) needs /var to be a $critical_filesystem_beforenet
* dhclient now starts before syslogd (because the latter needs /usr, and
  /usr might need dhclient to be mounted)

Should fix PRs:
    [install/9853] [bin/10002] [misc/10349] [port-i386/10633] [misc/10641]

# $NetBSD: motd,v 1.3 2000/07/26 00:11:49 lukem Exp $

# PROVIDE: motd
# REQUIRE: mountcritremote

. /etc/rc.subr

start_precmd="checkyesno update_motd"

	#	Update kernel info in /etc/motd
	#	Must be done *before* interactive logins are possible
	#	to prevent possible race conditions.
	echo "Updating motd."
	if [ ! -f /etc/motd ]; then
		install -c -o root -g wheel -m 664 /dev/null /etc/motd
	rm -f $T
	sysctl -n kern.version | sed 1q > $T
	echo "" >> $T
	sed '1,/^$/d' < /etc/motd >> $T
	cmp -s $T /etc/motd || cp $T /etc/motd
	rm -f $T

load_rc_config $name
run_rc_command "$1"