[Pkg-sysvinit-commits] r370 - in sysvinit/trunk/debian: .
initscripts initscripts/etc/init.d initscripts/share
Thomas Hood
jdthood-guest at costa.debian.org
Wed Dec 14 19:55:44 UTC 2005
Author: jdthood-guest
Date: 2005-12-14 19:55:44 +0000 (Wed, 14 Dec 2005)
New Revision: 370
Modified:
sysvinit/trunk/debian/changelog
sysvinit/trunk/debian/initscripts/etc/init.d/bootmisc.sh
sysvinit/trunk/debian/initscripts/postinst
sysvinit/trunk/debian/initscripts/share/default.rcS
Log:
Keep motd in /var/run
Modified: sysvinit/trunk/debian/changelog
===================================================================
--- sysvinit/trunk/debian/changelog 2005-12-14 19:08:03 UTC (rev 369)
+++ sysvinit/trunk/debian/changelog 2005-12-14 19:55:44 UTC (rev 370)
@@ -25,6 +25,10 @@
* mountall.sh, mountnfs.sh: Split call to bootclean out into separate
script called at the next sequence number (Closes: #286479)
* bootmisc.sh: Shorten motd header (Closes: #340017)
+ * bootmisc.sh: Store dynamic motd in /var/run/ and make /etc/motd a
+ symbolic link. The EDITMOTD variable no longer has any effect; to
+ disable updating of the motd just point the /etc/motd symlink to a
+ static file such as /etc/motd.static.
* bootmisc.sh: Rotate dmesg log with savelog (Closes: #237074)
and chgrp adm.
* umountroot: Change mount command in order to exclude bind mounts of
Modified: sysvinit/trunk/debian/initscripts/etc/init.d/bootmisc.sh
===================================================================
--- sysvinit/trunk/debian/initscripts/etc/init.d/bootmisc.sh 2005-12-14 19:08:03 UTC (rev 369)
+++ sysvinit/trunk/debian/initscripts/etc/init.d/bootmisc.sh 2005-12-14 19:55:44 UTC (rev 370)
@@ -10,7 +10,6 @@
### END INIT INFO
[ "$DELAYLOGIN" ] || DELAYLOGIN=yes
-[ "$EDITMOTD" ] || EDITMOTD=yes
. /lib/init/vars.sh
do_start () {
@@ -36,18 +35,9 @@
chown -f root:tty /dev/tty[p-za-e][0-9a-f]
fi
- # Update /etc/motd. If it's a symbolic link, do the actual work
- # in the directory the link points to.
- if [ "$EDITMOTD" != no ]
- then
- MOTD="$(readlink -f /etc/motd || :)"
- if [ "$MOTD" != "" ]
- then
- uname -snrvm > $MOTD.tmp
- sed 1d $MOTD >> $MOTD.tmp
- mv $MOTD.tmp $MOTD
- fi
- fi
+ # Update motd
+ uname -snrvm > /var/run/motd
+ [ -f /etc/motd.tail ] && cat /etc/motd.tail >> /var/run/motd
# Save kernel messages in /var/log/dmesg
if which dmesg >/dev/null
Modified: sysvinit/trunk/debian/initscripts/postinst
===================================================================
--- sysvinit/trunk/debian/initscripts/postinst 2005-12-14 19:08:03 UTC (rev 369)
+++ sysvinit/trunk/debian/initscripts/postinst 2005-12-14 19:55:44 UTC (rev 370)
@@ -206,4 +206,37 @@
fi
done
+#
+# Set up motd stuff
+#
+if [ ! -f /etc/motd.tail ]
+then
+ if [ -f /etc/motd ]
+ then
+ sed 1d /etc/motd > /etc/motd.tail
+ else
+ :>/etc/motd.tail
+ fi
+fi
+if [ ! -f /var/run/motd ]
+then
+ if [ -f /etc/motd ]
+ then
+ cat /etc/motd > /var/run/motd
+ else
+ :>/var/run/motd
+ fi
+fi
+if [ ! -L /etc/motd ]
+then
+ [ -f /etc/default/rcS ] && . /etc/default/rcS
+ if [ "$EDITMOTD" = no ]
+ then
+ cat /var/run/motd > /etc/motd.static
+ ln -sf motd.static /etc/motd
+ else
+ ln -sf /var/run/motd /etc/motd
+ fi
+fi
+
exit 0
Modified: sysvinit/trunk/debian/initscripts/share/default.rcS
===================================================================
--- sysvinit/trunk/debian/initscripts/share/default.rcS 2005-12-14 19:08:03 UTC (rev 369)
+++ sysvinit/trunk/debian/initscripts/share/default.rcS 2005-12-14 19:55:44 UTC (rev 370)
@@ -22,8 +22,5 @@
# Set to "no" if you would like less verbose boot messages.
VERBOSE=yes
-# Set to "no" if you do not want /etc/motd to be regenerated at boot.
-EDITMOTD=yes
-
# Set to "yes" if you want fsck to run with the "-y" options at boot.
FSCKFIX=no
More information about the Pkg-sysvinit-commits
mailing list