Merge "dhcp-all-interfaces: support Centos/RHEL 6"

This commit is contained in:
Jenkins 2016-11-08 11:21:51 +00:00 committed by Gerrit Code Review
commit 587d14feed
2 changed files with 8 additions and 1 deletions

View File

@ -15,7 +15,13 @@ fi
DIB_INIT_SYSTEM=$(dib-init-system)
if [ "$DIB_INIT_SYSTEM" == "upstart" ]; then
install -D -g root -o root -m 0755 ${SCRIPTDIR}/dhcp-all-interfaces.conf /etc/init/dhcp-all-interfaces.conf
if [ -e "/etc/redhat-release" ] ; then
# the init system is upstart but networking is using sysv compatabiliy (i.e. Centos/RHEL 6)
install -D -g root -o root -m 0755 ${SCRIPTDIR}/dhcp-all-interfaces.init /etc/init.d/dhcp-all-interfaces
chkconfig dhcp-all-interfaces on
else
install -D -g root -o root -m 0755 ${SCRIPTDIR}/dhcp-all-interfaces.conf /etc/init/dhcp-all-interfaces.conf
fi
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 0644 ${SCRIPTDIR}/dhcp-all-interfaces-udev.rules /etc/udev/rules.d/99-dhcp-all-interfaces.rules

View File

@ -6,6 +6,7 @@
# Default-Start: S
# Default-Stop: 0 6
# X-Start-Before: networking
# chkconfig: 3 9 50
# Short-Description: Autodetect network interfaces
# Description: Autodetect network interfaces during boot and configure them for DHCP
### END INIT INFO