2013-11-07 04:25:34 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -x
|
2013-03-05 17:34:19 +00:00
|
|
|
|
|
|
|
SCRIPTDIR=$(dirname $0)
|
|
|
|
|
2014-01-21 21:10:43 +00:00
|
|
|
install -D -g root -o root -m 0755 ${SCRIPTDIR}/dhcp-all-interfaces.sh /usr/local/sbin/dhcp-all-interfaces.sh
|
2014-01-09 20:32:52 +00:00
|
|
|
|
|
|
|
DIB_INIT_SYSTEM=$(dib-init-system)
|
|
|
|
if [ "$DIB_INIT_SYSTEM" == "upstart" ]; then
|
2013-10-14 22:54:37 +00:00
|
|
|
install -D -g root -o root -m 0755 ${SCRIPTDIR}/dhcp-all-interfaces.conf /etc/init/dhcp-all-interfaces.conf
|
2014-01-09 20:32:52 +00:00
|
|
|
elif [ "$DIB_INIT_SYSTEM" == "systemd" ]; then
|
2014-02-14 01:41:45 +00:00
|
|
|
install -D -g root -o root -m 0755 ${SCRIPTDIR}/dhcp-all-interfaces.service /usr/lib/systemd/system/dhcp-all-interfaces.service
|
|
|
|
systemctl enable dhcp-all-interfaces.service
|
2013-10-14 22:54:37 +00:00
|
|
|
fi
|