when /etc/hostname is empty or missing 'localhost' not properly set as the hostname
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
sysvinit (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
If the file /etc/hostaname is empty or missing, the hostname is not properly set. This causes problems with the sudo version present in 6.06 (error message: sudo: unable to lookup hola via gethostbyname()). I think the sudo present in 6.10 fixed this.
Anyway, to fix the problem to the root, the file /etc/init.
root@localhost:
*** hostname.default.sh 2007-02-08 17:38:31.000000000 +0100
--- hostname.sh 2007-02-08 17:23:36.000000000 +0100
***************
*** 23,28 ****
--- 23,29 ----
# And set it to 'localhost' if no setting was found
[ -z "$HOSTNAME" ] && HOSTNAME=localhost
+ [ "$HOSTNAME" == "(none)" ] && HOSTNAME=localhost
[ "$VERBOSE" != no ] && log_action_
hostname "$HOSTNAME"
Changed in sysvinit: | |
status: | Incomplete → Confirmed |
Thank you for taking the time to report this bug and helping to make Ubuntu better. You reported this bug a while ago and there hasn't been any activity in it recently. We were wondering is this still an issue for you? If so, please reopen the bug. Thanks in advance.