Skip to content

Commit

Permalink
rc: generate and permanently save hostid
Browse files Browse the repository at this point in the history
  • Loading branch information
fichtner committed Apr 4, 2018
1 parent 4f8a9b0 commit e49a617
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/etc/inc/system.inc
Expand Up @@ -379,12 +379,8 @@ function system_hostname_configure($verbose = false)

$hostname = "{$syscfg['hostname']}.{$syscfg['domain']}";

/* set hostname */
mwexecf('/bin/hostname %s', $hostname);

/* Setup host GUID ID. This is used by ZFS. */
mwexec("/etc/rc.d/hostid start");

if ($verbose) {
echo "{$hostname}\n";
}
Expand Down Expand Up @@ -691,8 +687,6 @@ function system_syslogd_start($verbose = false)

configd_run('template reload OPNsense/Syslog');

mwexec('/etc/rc.d/hostid start');

$syslogcfg = $config['syslog'];

$log_directive = '%';
Expand Down
4 changes: 4 additions & 0 deletions src/etc/rc
Expand Up @@ -119,6 +119,10 @@ fi
# regenerate groups and users for base
/usr/local/etc/rc.subr.d/recover base > /dev/null

# generate hostid and save it permanenty
/etc/rc.d/hostid start
/etc/rc.d/hostid_save start

# set keyboard map if needed
/etc/rc.d/syscons onestart

Expand Down

0 comments on commit e49a617

Please sign in to comment.