diff --git a/elements/dhcp-all-interfaces/install.d/50-dhcp-all-interfaces b/elements/dhcp-all-interfaces/install.d/50-dhcp-all-interfaces index f17b23a7..24c109eb 100755 --- a/elements/dhcp-all-interfaces/install.d/50-dhcp-all-interfaces +++ b/elements/dhcp-all-interfaces/install.d/50-dhcp-all-interfaces @@ -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 diff --git a/elements/dhcp-all-interfaces/install.d/dhcp-all-interfaces.init b/elements/dhcp-all-interfaces/install.d/dhcp-all-interfaces.init index 8023e154..89fb7919 100755 --- a/elements/dhcp-all-interfaces/install.d/dhcp-all-interfaces.init +++ b/elements/dhcp-all-interfaces/install.d/dhcp-all-interfaces.init @@ -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