aboutsummaryrefslogtreecommitdiff
path: root/toys/lsb
diff options
context:
space:
mode:
Diffstat (limited to 'toys/lsb')
-rw-r--r--toys/lsb/hostname.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/toys/lsb/hostname.c b/toys/lsb/hostname.c
index e64f4ff6..bd319188 100644
--- a/toys/lsb/hostname.c
+++ b/toys/lsb/hostname.c
@@ -10,7 +10,7 @@ USE_HOSTNAME(NEWTOY(hostname, NULL, TOYFLAG_BIN))
config HOSTNAME
bool "hostname"
- default n
+ default y
help
usage: hostname [newname]
@@ -24,10 +24,10 @@ void hostname_main(void)
const char *hostname = toys.optargs[0];
if (hostname) {
if (sethostname(hostname, strlen(hostname)))
- perror_exit("cannot set hostname to '%s'", hostname);
+ perror_exit("set failed '%s'", hostname);
} else {
if (gethostname(toybuf, sizeof(toybuf)))
- perror_exit("cannot get hostname");
+ perror_exit("get failed");
xputs(toybuf);
}
}