tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: serge () euler ! Berkeley ! EDU
To: tru64-unix-managers
Subject: /etc/motd problem at startup
Date: Wed, 01 Mar 1995 18:31:54 +0000	[thread overview]
Message-ID: <96075318306345.tru64-unix-managers.marc@archive.invalid> (raw)

On a related note, /sbin/init.d/motd uses mv to update /etc/motd, which
means that if you changed /etc/motd's permissions and/or group and/or
owner and/or made it a link (e.g. so that your dumper could post
shutdown notices in it for full dumps), these changes will get wiped out
at next reboot.

The fix is something like the following:

*** /sbin/init.d/motd.old	Wed Mar 01 10:31:20 1995
--- /sbin/init.d/motd	Wed Mar 01 10:24:59 1995
***************
*** 33,39 ****
  (strings -14 "/`sizer -b`" | grep 'DEC OSF/1 .* (Rev'; \
  test -x $UWS_VERS_CMD && $UWS_VERS_CMD; \
  test -f $MOTD_FILE && grep -v 'DEC OSF/1 .* (Rev' <$MOTD_FILE)>$MOTD_FILE.$$
! mv $MOTD_FILE.$$ $MOTD_FILE
  
  ed - $GETTYDEFS_FILE <<_Gettydefs_update_version_  2>/dev/null >/dev/null
  g/Version [XTV0-9]*\\.[0-9]*[^ ]*/s//Version `uname -r`/
--- 33,42 ----
  (strings -14 "/`sizer -b`" | grep 'DEC OSF/1 .* (Rev'; \
  test -x $UWS_VERS_CMD && $UWS_VERS_CMD; \
  test -f $MOTD_FILE && grep -v 'DEC OSF/1 .* (Rev' <$MOTD_FILE)>$MOTD_FILE.$$
! # copy to preserve owner, group, permission, linkage, etc.
! #mv $MOTD_FILE.$$ $MOTD_FILE
! cp -f $MOTD_FILE.$$ $MOTD_FILE
! rm -f $MOTD_FILE.$$
  
  ed - $GETTYDEFS_FILE <<_Gettydefs_update_version_  2>/dev/null >/dev/null
  g/Version [XTV0-9]*\\.[0-9]*[^ ]*/s//Version `uname -r`/

                 reply	other threads:[~1995-03-01 18:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox