From 812d2b09b95b29ffacdd86d5b63ba04ff28a2c2c Mon Sep 17 00:00:00 2001 From: Samir Date: Sun, 24 Jun 2012 00:42:45 +0000 Subject: [PATCH] add systemd units to dhcpcd --- dhcpcd/PKGBUILD | 11 ++++++++--- dhcpcd/dhcpcd@.service | 13 +++++++++++++ 2 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 dhcpcd/dhcpcd@.service diff --git a/dhcpcd/PKGBUILD b/dhcpcd/PKGBUILD index 0d11154c2..e9373d898 100644 --- a/dhcpcd/PKGBUILD +++ b/dhcpcd/PKGBUILD @@ -6,7 +6,7 @@ pkgname=dhcpcd pkgver=5.2.12 -pkgrel=2 +pkgrel=3 pkgdesc="RFC2131 compliant DHCP client daemon" url="http://roy.marples.name/dhcpcd/" arch=('i686' 'x86_64') @@ -16,9 +16,11 @@ depends=('glibc' 'sh') backup=('etc/conf.d/dhcpcd' 'etc/dhcpcd.conf') options=('emptydirs') # We Need the Empty /var/lib/dhcpcd Directory source=("http://roy.marples.name/downloads/$pkgname/$pkgname-$pkgver.tar.bz2" \ - 'dhcpcd.conf.d') + 'dhcpcd.conf.d' + 'dhcpcd@.service') sha1sums=('27378a251705c7888332e6d60eea7805d1f8aeb5' - 'b67b9ce6a2faaca75fea356966a16be2283b7db0') + 'b67b9ce6a2faaca75fea356966a16be2283b7db0' + '3d0542eab1b89a88d56ca427128228ac72c40d1f') build() { cd ${srcdir}/${pkgname}-${pkgver} @@ -48,4 +50,7 @@ package() { # Set Options in /etc/dhcpcd.conf echo noipv4ll >> ${pkgdir}/etc/dhcpcd.conf || return 1 # Disable ip4vall + + # install systemd unit + install -Dm644 "$srcdir/dhcpcd@.service" "$pkgdir/dhcpcd@.service" } diff --git a/dhcpcd/dhcpcd@.service b/dhcpcd/dhcpcd@.service new file mode 100644 index 000000000..25a1923ac --- /dev/null +++ b/dhcpcd/dhcpcd@.service @@ -0,0 +1,13 @@ +[Unit] +Description=dhcpcd on %I +Wants=network.target +Before=network.target + +[Service] +Type=forking +PIDFile=/run/dhcpcd-%I.pid +ExecStart=/sbin/dhcpcd -A -q -w %I +ExecStop=/sbin/dhcpcd -k %I + +[Install] +Alias=multi-user.target.wants/dhcpcd@eth0.service