diff options
author | brucec <brucec@FreeBSD.org> | 2010-08-17 09:39:06 +0000 |
---|---|---|
committer | brucec <brucec@FreeBSD.org> | 2010-08-17 09:39:06 +0000 |
commit | 8d54dbc4591e4b62384caa7d630faa4299ee25b5 (patch) | |
tree | dddcbea3eb4b045482f04c13e365e39ed7d2049f /usr.sbin/sysinstall/install.c | |
parent | 5a79777b4407edd39781e06216e4dc6ca68bb6a7 (diff) | |
download | FreeBSD-src-8d54dbc4591e4b62384caa7d630faa4299ee25b5.zip FreeBSD-src-8d54dbc4591e4b62384caa7d630faa4299ee25b5.tar.gz |
To restart, sysinstall calls execl. Since it will create a new process, we
can't check to see if sysinstall is running as init just by checking if the
PID is 0. Introduce a new option that sets the RunningAsInit flag, and update
the code to check RunningAsInit intstead of getpid().
PR: bin/38854
Submitted by: Peter Sedeffow <peter at trumanbrewery.com>
Approved by: rrs (mentor)
MFC after: 1 month
Diffstat (limited to 'usr.sbin/sysinstall/install.c')
-rw-r--r-- | usr.sbin/sysinstall/install.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/sysinstall/install.c b/usr.sbin/sysinstall/install.c index cd43e94..07a16d1 100644 --- a/usr.sbin/sysinstall/install.c +++ b/usr.sbin/sysinstall/install.c @@ -1274,7 +1274,7 @@ installVarDefaults(dialogMenuItem *self) variable_set2(VAR_FIXIT_TTY, "serial", 0); variable_set2(VAR_PKG_TMPDIR, "/var/tmp", 0); variable_set2(VAR_MEDIA_TIMEOUT, itoa(MEDIA_TIMEOUT), 0); - if (getpid() != 1) + if (!RunningAsInit) variable_set2(SYSTEM_STATE, "update", 0); else variable_set2(SYSTEM_STATE, "init", 0); |