From 1dfd4b3e440929b405dd165d0d31f6e7d7dfe0cc Mon Sep 17 00:00:00 2001 From: Robert Collins Date: Fri, 14 Feb 2014 14:41:45 +1300 Subject: [PATCH] Revert "Add Fedora DHCP interfaces via udev rules." This reverts commit 201c9e85277dd6083d0cbc6e1318622583c2a082. This depended on the revert for one-at-a-time. Change-Id: I05f1f85b8f13a1eea3d5e4b144ff92e0e791bdac --- .../install.d/50-dhcp-all-interfaces | 3 ++- .../install.d/dhcp-all-interfaces.service | 14 ++++++++++++++ elements/dhcp-all-interfaces/install.d/udev.rules | 1 - 3 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 elements/dhcp-all-interfaces/install.d/dhcp-all-interfaces.service delete mode 100644 elements/dhcp-all-interfaces/install.d/udev.rules 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 06098735..eaa51c71 100755 --- a/elements/dhcp-all-interfaces/install.d/50-dhcp-all-interfaces +++ b/elements/dhcp-all-interfaces/install.d/50-dhcp-all-interfaces @@ -9,5 +9,6 @@ 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 + install -D -g root -o root -m 0755 ${SCRIPTDIR}/dhcp-all-interfaces.service /usr/lib/systemd/system/dhcp-all-interfaces.service + systemctl enable dhcp-all-interfaces.service fi diff --git a/elements/dhcp-all-interfaces/install.d/dhcp-all-interfaces.service b/elements/dhcp-all-interfaces/install.d/dhcp-all-interfaces.service new file mode 100644 index 00000000..e19c9240 --- /dev/null +++ b/elements/dhcp-all-interfaces/install.d/dhcp-all-interfaces.service @@ -0,0 +1,14 @@ +[Unit] +Description=DHCP All Interfaces Service +Wants=local-fs.target systemd-udev-settle.service +After=local-fs.target systemd-udev-settle.service +Before=network.service + +[Service] +Type=oneshot +ExecStart=/usr/local/sbin/dhcp-all-interfaces.sh +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target +Alias=dhcp-all-interfaces.service diff --git a/elements/dhcp-all-interfaces/install.d/udev.rules b/elements/dhcp-all-interfaces/install.d/udev.rules deleted file mode 100644 index 88ce3e13..00000000 --- a/elements/dhcp-all-interfaces/install.d/udev.rules +++ /dev/null @@ -1 +0,0 @@ -SUBSYSTEM=="net", ACTION=="add", RUN+="/usr/local/sbin/dhcp-all-interfaces.sh $name", RUN+="/sbin/ifup $name"