2013-11-07 04:25:34 +00:00
|
|
|
#!/bin/bash
|
2014-03-29 03:28:22 +00:00
|
|
|
set -eux
|
|
|
|
set -o pipefail
|
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-03-19 18:33:14 +00:00
|
|
|
install -D -g root -o root -m 0755 ${SCRIPTDIR}/dhcp-interface@.service /usr/lib/systemd/system/dhcp-interface@.service
|
2014-03-21 19:12:37 +00:00
|
|
|
install -D -g root -o root -m 0644 ${SCRIPTDIR}/dhcp-all-interfaces-udev.rules /etc/udev/rules.d/99-dhcp-all-interfaces.rules
|
2013-10-14 22:54:37 +00:00
|
|
|
fi
|