[arch-releng] [PATCH] Run dhcpcd on all devices

Pierre Schmitz pierre at archlinux.de
Fri Oct 5 05:34:45 EDT 2012


As we did with initscripts, run dhcpcd on all devices and not just eth0.

Signed-off-by: Pierre Schmitz <pierre at archlinux.de>
---
 configs/releng/build.sh                                     |  2 +-
 configs/releng/root-image/etc/conf.d/dhcpcd                 |  6 ------
 configs/releng/root-image/etc/systemd/system/dhcpcd.service | 13 +++++++++++++
 3 files changed, 14 insertions(+), 7 deletions(-)
 delete mode 100644 configs/releng/root-image/etc/conf.d/dhcpcd
 create mode 100644 configs/releng/root-image/etc/systemd/system/dhcpcd.service

diff --git a/configs/releng/build.sh b/configs/releng/build.sh
index 0d93ccd..3601dff 100755
--- a/configs/releng/build.sh
+++ b/configs/releng/build.sh
@@ -194,7 +194,7 @@ make_customize_root_image() {
             -r 'useradd -m -p "" -g users -G "audio,disk,optical,wheel" -s /bin/zsh arch' \
             run
         mkarchiso ${verbose} -w "${work_dir}" -C "${pacman_conf}" -D "${install_dir}" \
-            -r 'systemctl -f enable multi-user.target haveged.service pacman-init.service autologin at .service dhcpcd at .service || true' \
+            -r 'systemctl -f enable multi-user.target haveged.service pacman-init.service autologin at .service dhcpcd.service || true' \
             run
         : > ${work_dir}/build.${FUNCNAME}
     fi
diff --git a/configs/releng/root-image/etc/conf.d/dhcpcd b/configs/releng/root-image/etc/conf.d/dhcpcd
deleted file mode 100644
index 76b56ff..0000000
--- a/configs/releng/root-image/etc/conf.d/dhcpcd
+++ /dev/null
@@ -1,6 +0,0 @@
-#
-# Arguments to be passed to the DHCP client daemon
-#
-
-DHCPCD_ARGS="-qb"
-
diff --git a/configs/releng/root-image/etc/systemd/system/dhcpcd.service b/configs/releng/root-image/etc/systemd/system/dhcpcd.service
new file mode 100644
index 0000000..dd030d5
--- /dev/null
+++ b/configs/releng/root-image/etc/systemd/system/dhcpcd.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=dhcpcd on all interfaces
+Wants=network.target
+Before=network.target
+
+[Service]
+Type=forking
+PIDFile=/run/dhcpcd.pid
+ExecStart=/sbin/dhcpcd -A -b -q
+ExecStop=/sbin/dhcpcd -k
+
+[Install]
+WantedBy=multi-user.target
-- 
1.7.12.2


More information about the arch-releng mailing list