blob: c4c4a02cedcb124c2951c95fcb0e1039e8c863a3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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
|