summarylogtreecommitdiffstats
path: root/hostname
diff options
context:
space:
mode:
authorJimmy Xu2019-11-22 17:17:41 +0000
committerJimmy Xu2019-11-22 17:17:41 +0000
commit59d387658e12a55fd56febf67adc7f03bbf3d060 (patch)
tree8234f546a5311981fbd61d733df8bf832d85539f /hostname
parent592f6862d18f236113c57f5d73e0aed25889a156 (diff)
downloadaur-59d387658e12a55fd56febf67adc7f03bbf3d060.tar.gz
flightradar24: Get rid of the `hostname: invalid option' warning
Diffstat (limited to 'hostname')
-rw-r--r--hostname17
1 files changed, 17 insertions, 0 deletions
diff --git a/hostname b/hostname
new file mode 100644
index 000000000000..c4c4a02cedcb
--- /dev/null
+++ b/hostname
@@ -0,0 +1,17 @@
+#!/bin/sh -
+
+# Any copyright is dedicated to the Public Domain.
+# https://creativecommons.org/publicdomain/zero/1.0/
+
+# Helper for dealing with incompatibility with Debian hostname:
+# hostname: invalid option -- 'I'
+
+# -I, --all-ip-addresses all addresses for the host
+
+if [ x"$1" = x"-I" ]; then
+ ip -o address show up scope global | \
+ grep -Po '(?<=inet |inet6 )[^/]+' | \
+ xargs echo
+else
+ exec /usr/bin/hostname "$@"
+fi