summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2002-02-21 04:18:43 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2002-02-21 04:18:43 +0000
commitfe4c5b87b5ae9ee2fd922a008c834af5f671fc45 (patch)
tree0b03c01840b8034f6ea9dd78f73a50402c022cc0 /etc
parent632b5fbb8d19d35bfed874eb4647b36ab4ffb58c (diff)
If there is a /var/run/dhclient.pid file, stash its contents and
restore it after cleaning out /var/run. Since we don't have /usr yet our options are limited here. Without this change /var/run/dhclient.pid will be removed after dhclient is started from /etc/netstart.
Diffstat (limited to 'etc')
-rw-r--r--etc/rc4
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/rc b/etc/rc
index f72a1a203c4..d8364f61384 100644
--- a/etc/rc
+++ b/etc/rc
@@ -1,4 +1,4 @@
-# $OpenBSD: rc,v 1.191 2002/02/19 02:21:16 deraadt Exp $
+# $OpenBSD: rc,v 1.192 2002/02/21 04:18:42 millert Exp $
# System startup script run by init on autoboot
# or after single-user.
@@ -178,7 +178,7 @@ dd if=/dev/urandom of=/var/db/host.random bs=1024 count=64 \
rm -f /etc/nologin
rm -f /var/spool/lock/LCK.*
rm -f /var/spool/uucp/STST/*
-(cd /var/run && { rm -rf -- *; install -c -m 664 -g utmp /dev/null utmp; })
+(cd /var/run && { test -r dhclient.pid && dhclient_pid=`cat dhclient.pid`; rm -rf -- *; install -c -m 664 -g utmp /dev/null utmp; test -n "$dhclient_pid" && echo "$dhclient_pid" > dhclient.pid; })
# save a copy of the boot messages
dmesg >/var/run/dmesg.boot