You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`hostname -f` could fail depending on the resolver. Discard any stderr
and test for the exit status before using the value for flake attribute
lookup.
I was unable to repro the exact bad exit status in nix-community#5665.
With
- nscd disabled,
- nsswitch.conf pointing to 'files',
- hostname entry removed from /etc/hosts
`hostname -f` from inetutils-2.5 fell back to showing just the nodename
from `uname(2)`. Injecting an empty string into the
`(struct utsname).nodename` field of `uname(2)` using strace still
exited with empty output and 0 exit-status.
Fixesnix-community#5665
brckd
pushed a commit
to brckd/home-manager
that referenced
this issue
Sep 24, 2024
`hostname -f` could fail depending on the resolver. Discard any stderr
and test for the exit status before using the value for flake attribute
lookup.
I was unable to repro the exact bad exit status in nix-community#5665.
With
- nscd disabled,
- nsswitch.conf pointing to 'files',
- hostname entry removed from /etc/hosts
`hostname -f` from inetutils-2.5 fell back to showing just the nodename
from `uname(2)`. Injecting an empty string into the
`(struct utsname).nodename` field of `uname(2)` using strace still
exited with empty output and 0 exit-status.
Fixesnix-community#5665
Mikilio
pushed a commit
to Mikilio/home-manager
that referenced
this issue
Oct 11, 2024
`hostname -f` could fail depending on the resolver. Discard any stderr
and test for the exit status before using the value for flake attribute
lookup.
I was unable to repro the exact bad exit status in nix-community#5665.
With
- nscd disabled,
- nsswitch.conf pointing to 'files',
- hostname entry removed from /etc/hosts
`hostname -f` from inetutils-2.5 fell back to showing just the nodename
from `uname(2)`. Injecting an empty string into the
`(struct utsname).nodename` field of `uname(2)` using strace still
exited with empty output and 0 exit-status.
Fixesnix-community#5665
Are you following the right branch?
Is there an existing issue for this?
Issue description
Note: migrated from #5462 (comment).
After #5462, if the hostname is not set in
/etc/hosts
, the fqdn commandhostname -f
may fail with:This shows up in the
home-manager switch
printout and is mildly annoying. Could it be changed to:hostname -f 2>/dev/null
to suppress this inconsequential warning? Thank you!
Maintainer CC
@gauravjuvekar
System information
The text was updated successfully, but these errors were encountered: