From 9445eccffbb06cc79f243584902de97f84a250a4 Mon Sep 17 00:00:00 2001 From: millert <> Date: Thu, 21 Feb 2002 04:18:42 +0000 Subject: [PATCH] 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. --- src/etc/rc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/etc/rc b/src/etc/rc index f72a1a20..d8364f61 100644 --- a/src/etc/rc +++ b/src/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