201c9e8527
Updates the dhcp-all-interfaces element so that we add new DHCP interfaces using a udev rule instead of a systemd service. The previous approach (using the systemd service) was proving to be problematic when used with the new Fedora constistent network naming convention rules (em1, em2, etc.). We aren't using these device names as a default yet... but we will need to soon and when we do udev rules seem to be the best way to avoid racy behaviour when calling dhcp-all-interfaces.sh from the systemd service. Change-Id: I87e0aed1f34718e896bd414388886a1f1073b0c0
14 lines
508 B
Bash
Executable File
14 lines
508 B
Bash
Executable File
#!/bin/bash
|
|
set -x
|
|
|
|
SCRIPTDIR=$(dirname $0)
|
|
|
|
install -D -g root -o root -m 0755 ${SCRIPTDIR}/dhcp-all-interfaces.sh /usr/local/sbin/dhcp-all-interfaces.sh
|
|
|
|
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
|
|
elif [ "$DIB_INIT_SYSTEM" == "systemd" ]; then
|
|
install -D -g root -o root -m 0644 ${SCRIPTDIR}/udev.rules /etc/udev/rules.d/99-dhcp-all-interfaces.rules
|
|
fi
|