I'm working with an embedded system where we have now set our file system to read only to protect the flash. I still want to be able to change the hostname dynamically, as it is useful to see in journal logs what device it is. Before read only file system I used hostnamed and set both the static and the dynamic hostname. Now the static hostname command of course complains that it can't write to the file system, which is not weird.
So I thought I would just remove the static call and be fine with the dynamic as I set it every boot. Boot then I noticed that the hostname is not changed for either the prompt nor the journal logs. But if I call the static one, it complains but still sets it somewhere and it works.
Looking at the source, I can not figure out what the static call does that the dynamic doesn't...
So I thought I would just remove the static call and be fine with the dynamic as I set it every boot. Boot then I noticed that the hostname is not changed for either the prompt nor the journal logs. But if I call the static one, it complains but still sets it somewhere and it works.
Looking at the source, I can not figure out what the static call does that the dynamic doesn't...