Merge "Add sysv support to elements/dhcp-all-interfaces"
This commit is contained in:
commit
d99d8092a7
@ -12,4 +12,7 @@ if [ "$DIB_INIT_SYSTEM" == "upstart" ]; then
|
|||||||
elif [ "$DIB_INIT_SYSTEM" == "systemd" ]; then
|
elif [ "$DIB_INIT_SYSTEM" == "systemd" ]; then
|
||||||
install -D -g root -o root -m 0755 ${SCRIPTDIR}/dhcp-interface@.service /usr/lib/systemd/system/dhcp-interface@.service
|
install -D -g root -o root -m 0755 ${SCRIPTDIR}/dhcp-interface@.service /usr/lib/systemd/system/dhcp-interface@.service
|
||||||
install -D -g root -o root -m 0644 ${SCRIPTDIR}/dhcp-all-interfaces-udev.rules /etc/udev/rules.d/99-dhcp-all-interfaces.rules
|
install -D -g root -o root -m 0644 ${SCRIPTDIR}/dhcp-all-interfaces-udev.rules /etc/udev/rules.d/99-dhcp-all-interfaces.rules
|
||||||
|
elif [ "$DIB_INIT_SYSTEM" == "sysv" ]; then
|
||||||
|
install -D -g root -o root -m 0755 ${SCRIPTDIR}/dhcp-all-interfaces.init /etc/init.d/dhcp-all-interfaces
|
||||||
|
update-rc.d dhcp-all-interfaces defaults
|
||||||
fi
|
fi
|
||||||
|
31
elements/dhcp-all-interfaces/install.d/dhcp-all-interfaces.init
Executable file
31
elements/dhcp-all-interfaces/install.d/dhcp-all-interfaces.init
Executable file
@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/sh -e
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides: dhcp-all-interfaces
|
||||||
|
# Required-Start: $local_fs
|
||||||
|
# Required-Stop: $local_fs
|
||||||
|
# Default-Start: S
|
||||||
|
# Default-Stop: 0 6
|
||||||
|
# X-Start-Before: networking
|
||||||
|
# Short-Description: Autodetect network interfaces
|
||||||
|
# Description: Autodetect network interfaces during boot and configure them for DHCP
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
|
NAME=dhcp-all-interfaces
|
||||||
|
INIT_NAME=/etc/init.d/${NAME}
|
||||||
|
SCRIPT_NAME=/usr/local/sbin/${NAME}.sh
|
||||||
|
|
||||||
|
[ -x $SCRIPT_NAME ] || exit 0
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
$SCRIPT_NAME
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $INIT_NAME {start|stop}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 0
|
Loading…
Reference in New Issue
Block a user