From 6bfccde711ac0b297897fd2467b019ab762f3c38 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Sun, 31 May 2009 02:32:19 -0400 Subject: [PATCH] Set hostname then call hostid onestart --- etc/inc/system.inc | 7 ++++++- etc/rc | 3 --- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/etc/inc/system.inc b/etc/inc/system.inc index f05a3e91c7..73f200093e 100644 --- a/etc/inc/system.inc +++ b/etc/inc/system.inc @@ -210,8 +210,13 @@ function system_hostname_configure() { $syscfg = $config['system']; /* set hostname */ - return mwexec("/bin/hostname " . + $status = mwexec("/bin/hostname " . escapeshellarg("{$syscfg['hostname']}.{$syscfg['domain']}")); + + /* Setup host GUID ID. This is used by ZFS. */ + mwexec("/etc/rc.d/hostid start"); + + return $status; } function system_routing_configure() { diff --git a/etc/rc b/etc/rc index 9074e761c6..060794bd35 100755 --- a/etc/rc +++ b/etc/rc @@ -293,9 +293,6 @@ cap_mkdb /etc/login.conf # /usr/local/etc/php.ini and /usr/local/lib/php.ini . /etc/rc.php_ini_setup -# Setup the hostid which is required for ZFS -/etc/rc.d/hostid start - # let the PHP-based configuration subsystem set up the system now echo -n "Launching PHP init system..." rm -f /cf/conf/backup/backup.cache