fixing the preinst script to rely on DNS as well
This commit is contained in:
parent
8a53109d81
commit
769ef9695f
|
@ -16,15 +16,15 @@ set -e
|
|||
|
||||
case "$1" in
|
||||
install|upgrade)
|
||||
source /etc/wit-net.conf
|
||||
export DOMAINNAME=${HOSTNAME#*.}
|
||||
export LOOPBACKv4=$(dig +short ${HOSTNAME%%.*}.loopback.${HOSTNAME#*.})
|
||||
export TIER_ID=$(echo $LOOPBACKv4 | cut -d . -f 3)
|
||||
export NODE_ID=$(echo $LOOPBACKv4 | cut -d . -f 4)
|
||||
|
||||
if [ -z $LOOPBACKv4 ]; then
|
||||
echo "LOOPBACK NOT CONFIGURED, aborting..."
|
||||
exit 2
|
||||
fi
|
||||
if [[ $LOOPBACKv4 != "10.1."* ]]; then
|
||||
echo "only 10.1.x.y loopbacks supported at the moment"
|
||||
exit 3
|
||||
fi
|
||||
systemctl stop systemd-networkd.socket
|
||||
systemctl stop systemd-networkd.service
|
||||
systemctl stop systemd-networkd-wait-online
|
||||
|
|
Loading…
Reference in New Issue