netplug: look for init script configurations in /etc/default/

We are working to make all sysvinit scripts conformant to a pattern and
/etc/default/ seems to be a good choice, since 34 packages already get
optional configurations from files at that directory.

netplug still installs an init script at /etc/rc.d/init.d/.  This will
be fixed in a future patch that will refactor the init scripts.

Signed-off-by: Carlos Santos <casantos@datacom.com.br>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Carlos Santos 2018-06-04 23:11:56 -03:00 committed by Thomas Petazzoni
parent 49844baf2f
commit 4adaa581b2

View File

@ -22,8 +22,8 @@ elif [ -f /etc/rc.d/init.d/functions ]; then
fi fi
# Source networking configuration. # Source networking configuration.
if [ -f /etc/sysconfig/network ]; then if [ -f /etc/default/network ]; then
. /etc/sysconfig/network . /etc/default/network
# Check that networking is up. # Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0 [ ${NETWORKING} = "no" ] && exit 0
@ -32,8 +32,8 @@ elif [ ! -f /etc/network/interfaces ]; then
exit 0 exit 0
fi fi
if [ -f /etc/sysconfig/netplugd ]; then if [ -f /etc/default/netplugd ]; then
. /etc/sysconfig/netplugd . /etc/default/netplugd
fi fi
# See how we were called. # See how we were called.