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-03-06 18:56:31 +00:00
|
|
|
install -D -g root -o root -m 0644 ${SCRIPTDIR}/udev.rules /etc/udev/rules.d/99-dhcp-all-interfaces.rules
|
2013-10-14 22:54:37 +00:00
|
|
|
fi
|