Commit 844590fa authored by David Johnson's avatar David Johnson

Better obey the dhclient-script semantics in Ubuntu 14 and 16.

These scripts should not ever exit, lest they block other hook
scripts from running.  return isn't really correct
either, but at least it won't prevent future scripts from running;
it will just nullify some of the logging dhclient-script does.
parent 452f8854
......@@ -27,7 +27,7 @@ echo "`date`: ${interface}: ${reason}" >>$LOGDIR/dhclient-exit.log 2>&1
if [ x$reason != xREBOOT -a x$reason != xBOUND -a x$reason != xRENEW -a x$reason != xREBIND ]
then
exit 0
return 0
fi
#
......@@ -51,7 +51,7 @@ if [ x"$new_domain_name_servers" = "x1.1.1.1" ]; then
cp /dev/null /etc/resolv.conf
fi
exit_status=1
exit 1
return 1
fi >>$LOGDIR/dhclient-exit.log 2>&1
#
......@@ -82,7 +82,7 @@ esac
# no hostname. We don't need to record anything in this case, so skip it.
#
if [ x"$new_host_name" = x ]; then
exit 0
return 0
fi
#
......@@ -112,4 +112,4 @@ echo "`date`: ${interface}: ${reason}: done" >>$LOGDIR/dhclient-exit.log 2>&1
# by the dhclient caller (sysconfig/network-scripts/ifcfg-eth99)
#
exit 0
# No need to return or exit; we are run inline.
......@@ -27,7 +27,7 @@ echo "`date`: ${interface}: ${reason}" >>$LOGDIR/dhclient-exit.log 2>&1
if [ x$reason != xREBOOT -a x$reason != xBOUND -a x$reason != xRENEW -a x$reason != xREBIND ]
then
exit 0
return 0
fi
#
......@@ -51,7 +51,7 @@ if [ x"$new_domain_name_servers" = "x1.1.1.1" ]; then
cp /dev/null /etc/resolv.conf
fi
exit_status=1
exit 1
return 1
fi >>$LOGDIR/dhclient-exit.log 2>&1
#
......@@ -82,7 +82,7 @@ esac
# no hostname. We don't need to record anything in this case, so skip it.
#
if [ x"$new_host_name" = x ]; then
exit 0
return 0
fi
#
......@@ -143,4 +143,4 @@ echo "`date`: ${interface}: ${reason}: done" >>$LOGDIR/dhclient-exit.log 2>&1
# by the dhclient caller (sysconfig/network-scripts/ifcfg-eth99)
#
exit 0
# No need to return or exit; we are run inline.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment