Hello Cyril,

Am 08.04.23 um 23:50 schrieb Cyril Brulebois:
Oliver Freyermuth <freyerm...@physik.uni-bonn.de> (2023-04-08):
Interestingky, without the "hostname=" parameter, running hostname on
a tty (while the question is shown) echoes:

   ~ # hostname
   ?

I found that part slightly strange. From earlier on IRC:

     <kibi> fun how we get '(none)' by default and '?' instead with -s.
     <kibi> ('?' comes from safe_gethostname depending on uts.nodename[0])

so I'm not exactly sure why you're getting '?' by default instead of
'(none)'. Maybe that's once you've reached the network step and stuff
has happened? My observations were right after setting a keymap,
switching to a VT.

For context, I was initially wondering which options were supported by
busybox's hostname, hence my looking into this. (Wasn't entirely sure
how safe / future-proof hardcoding “(none)” would be; still unclear at
this point, but I haven't spent much time on this.)

Likely, that's indeed since stuff has already happened at that point. It seems that the 
newly added "if" worked as expected,
so it must have been "(none)" at the time of checking, and only changed to "?" 
afterwards.

However, that "question mark hostname" is also shown when doing this
with Bullseye, so that seems to be expected behaviour.

That part's reassuring.

Indeed :-).

Cheers,
        Oliver

Reply via email to