From fcb23579d7d55a41238d8ed7c2262bcbbf815ff9 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Tue, 11 Oct 2011 03:25:46 +0200 Subject: [PATCH] dhcpcd: switch to systemd, drop openrc support. --- srcpkgs/dhcpcd/files/dhcpcd.rc | 23 ----------------------- srcpkgs/dhcpcd/files/dhcpcd.service | 10 ++++++++++ srcpkgs/dhcpcd/template | 5 ++--- 3 files changed, 12 insertions(+), 26 deletions(-) delete mode 100644 srcpkgs/dhcpcd/files/dhcpcd.rc create mode 100644 srcpkgs/dhcpcd/files/dhcpcd.service diff --git a/srcpkgs/dhcpcd/files/dhcpcd.rc b/srcpkgs/dhcpcd/files/dhcpcd.rc deleted file mode 100644 index e12435ddd0b..00000000000 --- a/srcpkgs/dhcpcd/files/dhcpcd.rc +++ /dev/null @@ -1,23 +0,0 @@ -#!/sbin/runscript -# -# - -command=/sbin/dhcpcd -command_args=-q -pidfile=/var/run/dhcpcd.pid - -depend() -{ - provide net - need localmount - use logger - after bootmisc modules - before dns -} - -stop_pre() -{ - if yesno $RC_GOINGDOWN; then - : ${stopsig:=SIGKILL} - fi -} diff --git a/srcpkgs/dhcpcd/files/dhcpcd.service b/srcpkgs/dhcpcd/files/dhcpcd.service new file mode 100644 index 00000000000..bf288ceffe1 --- /dev/null +++ b/srcpkgs/dhcpcd/files/dhcpcd.service @@ -0,0 +1,10 @@ +[Unit] +Description=Lightweight DHCP client daemon +Wants=network.target +Before=network.target + +[Service] +ExecStart=/sbin/dhcpcd -q -B + +[Install] +WantedBy=multi-user.target diff --git a/srcpkgs/dhcpcd/template b/srcpkgs/dhcpcd/template index bdbdb2bde4e..c986a92eacd 100644 --- a/srcpkgs/dhcpcd/template +++ b/srcpkgs/dhcpcd/template @@ -1,6 +1,7 @@ # Template file for 'dhcpcd' pkgname=dhcpcd version=5.2.12 +revision=1 distfiles="http://roy.marples.name/downloads/dhcpcd/dhcpcd-$version.tar.bz2" build_style=configure configure_args="--libexecdir=/lib/dhcpcd" @@ -19,11 +20,9 @@ Add_dependency run glibc Add_dependency build ntp conf_files="/etc/dhcpcd.conf" -openrc_services="dhcpcd default false" post_install() { chmod 755 ${DESTDIR}/sbin/dhcpcd - # Install the OpenRC service - install -D -m755 ${FILESDIR}/dhcpcd.rc ${DESTDIR}/etc/init.d/dhcpcd + vinstall ${FILESDIR}/dhcpcd.service 644 lib/systemd/system }