OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • Archive »
  • 18.1 Legacy Series »
  • /etc/hostid not being generated
« previous next »
  • Print
Pages: [1]

Author Topic: /etc/hostid not being generated  (Read 4154 times)

loredo

  • Newbie
  • *
  • Posts: 38
  • Karma: 2
    • View Profile
/etc/hostid not being generated
« 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:

Code: [Select]
cat: /etc/hostid: No such file or directory
However, hostid should be generated during bootup:

Code: [Select]
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
Logged

loredo

  • Newbie
  • *
  • Posts: 38
  • Karma: 2
    • View Profile
Re: /etc/hostid not being generated
« Reply #1 on: April 01, 2018, 09:55:19 pm »
Looking into /etc/rc.d/hostid a simple start does not (re)generate non-existing file /etc/hostid.
Executing

Code: [Select]
service hostid reset
helps but shouldn't this be done automatically after OPNsense initial bootup?
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 13936
  • Karma: 1208
    • View Profile
Re: /etc/hostid not being generated
« Reply #2 on: April 04, 2018, 08:16:38 am »
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
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • Archive »
  • 18.1 Legacy Series »
  • /etc/hostid not being generated
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2023 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2