tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* /etc/motd problem at startup
@ 1995-03-01 18:31 serge
  0 siblings, 0 replies; only message in thread
From: serge @ 1995-03-01 18:31 UTC (permalink / raw)
  To: tru64-unix-managers

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`/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1995-03-01 18:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-03-01 18:31 /etc/motd problem at startup serge

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