diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2000-04-30 19:39:28 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2000-04-30 19:39:28 +0000 |
commit | 7c27e331bc63f7e359794be3b0747ec0d797cd68 (patch) | |
tree | 18541bb7578609211b4c78d03ee0a9fef5bd2e05 /distrib | |
parent | 24a24d5701d0a46e0aaa90406526aea10d003740 (diff) |
When doing an upgrade, if there is an /etc/sendmail.cf and no
/etc/mail/sendmail.cf, move /etc/sendmail.cf -> /etc/mail/sendmail.cf
and edit /etc/rc if needed. That way the sendmail binary will be
able to find its .cf file on reboot.
Diffstat (limited to 'distrib')
-rw-r--r-- | distrib/miniroot/upgrade.sh | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/distrib/miniroot/upgrade.sh b/distrib/miniroot/upgrade.sh index 8ca29577b2f..8d28b22d0ff 100644 --- a/distrib/miniroot/upgrade.sh +++ b/distrib/miniroot/upgrade.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $OpenBSD: upgrade.sh,v 1.13 2000/04/30 19:10:01 millert Exp $ +# $OpenBSD: upgrade.sh,v 1.14 2000/04/30 19:39:27 millert Exp $ # $NetBSD: upgrade.sh,v 1.2.4.5 1996/08/27 18:15:08 gwr Exp $ # # Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -287,11 +287,20 @@ esac rm -f /mnt/etc/localtime ln -s /usr/share/zoneinfo/$TZ /mnt/etc/localtime + if [ -f /mnt/etc/sendmail.cf -a ! -f /mnt/etc/mail/sendmail.cf ]; then + echo "Moving /etc/sendmail.cf -> /etc/mail/sendmail.cf" + test -d /mnt/etc/mail || mkdir /mnt/etc/mail + mv /mnt/etc/sendmail.cf /mnt/etc/mail/sendmail.cf + ed - /home/millert/foo << \__rc_edit +1,$s/etc\/sendmail.cf/etc\/mail\/sendmail.cf/g +w +q +__rc_edit + fi + echo -n "Making devices..." - #_pid=`twiddle` cd /mnt/dev sh MAKEDEV all - #kill $_pid echo "done." md_installboot ${ROOTDISK} |