mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-20 03:47:16 +02:00
The hostname bundled with busybox doesn't know the -fqdn switch. The same functionality can be reached using the -f switch.
26 lines
699 B
Diff
26 lines
699 B
Diff
When running with busybox "hostname", there is no "--fqdn" switch.
|
|
The same functionality is provided using the "-f" switch.
|
|
|
|
--- a/lib/Sys/Hostname/Long.pm
|
|
+++ b/lib/Sys/Hostname/Long.pm
|
|
@@ -69,7 +69,7 @@
|
|
},
|
|
|
|
'exec_hostname_fqdn' => {
|
|
- 'title' => 'Execute "hostname --fqdn"',
|
|
+ 'title' => 'Execute "hostname -f"',
|
|
'description' => '',
|
|
'exec' => sub {
|
|
# Skip for Solaris, and only run as non-root
|
|
@@ -77,9 +77,9 @@
|
|
my $tmp;
|
|
if ( $^O ne 'darwin' ) {
|
|
if ($< == 0) {
|
|
- $tmp = `su nobody -c "hostname --fqdn"`;
|
|
+ $tmp = `su nobody -c "hostname -f"`;
|
|
} else {
|
|
- $tmp = `hostname --fqdn`;
|
|
+ $tmp = `hostname -f`;
|
|
}
|
|
$tmp =~ tr/\0\r\n//d;
|
|
}
|