diff options
author | 2002-02-21 04:18:42 +0000 | |
---|---|---|
committer | 2002-02-21 04:18:42 +0000 | |
commit | 8bf61e847cee33b1a8fc0efda13c620cc697d87c (patch) | |
tree | 858fb83e5405d9b2274a96df9967b8fe1e3cbc3f | |
parent | Don't ignore the argument to undo. (makes ^U work) (diff) | |
download | wireguard-openbsd-8bf61e847cee33b1a8fc0efda13c620cc697d87c.tar.xz wireguard-openbsd-8bf61e847cee33b1a8fc0efda13c620cc697d87c.zip |
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.
-rw-r--r-- | etc/rc | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |