OPNsense Forum
Archive => 18.1 Legacy Series => Topic started by: loredo on April 01, 2018, 07:11:00 pm
-
Hi,
is there any reason /etc/hostid file is not generated automatically?
I see quite a lot of error messages when using command line, similar to this one:
cat: /etc/hostid: No such file or directory
However, hostid should be generated during bootup:
root@hostname:~ # sysrc -A|grep hostid
hostid_enable: YES
hostid_file: /etc/hostid
Apologies should this be a too simple question. I am new to BSD and wasn't able to find anything useful from Google about this so I assume it must be something OPNsense or HardenedBSD related?
If I run the hostid service manually it shows me the generated IDs but still wouldn't write those to the desired file(s).
Many thanks,
Julian
-
Looking into /etc/rc.d/hostid a simple start does not (re)generate non-existing file /etc/hostid.
Executing
service hostid reset
helps but shouldn't this be done automatically after OPNsense initial bootup?
-
The proper sequence seems to be:
/etc/rc.d/hostid start
/etc/rc.d/hostid_save start
So I've added this commit:
https://github.com/opnsense/core/commit/e49a6176
It could be that sometime during FreeBSD development hostid and hostid_save were broken up and we missed it.
Cheers,
Franco