add systemd units to dhcpcd

This commit is contained in:
Samir 2012-06-24 00:42:45 +00:00
parent f373fcea3e
commit 812d2b09b9
2 changed files with 21 additions and 3 deletions

View File

@ -6,7 +6,7 @@
pkgname=dhcpcd pkgname=dhcpcd
pkgver=5.2.12 pkgver=5.2.12
pkgrel=2 pkgrel=3
pkgdesc="RFC2131 compliant DHCP client daemon" pkgdesc="RFC2131 compliant DHCP client daemon"
url="http://roy.marples.name/dhcpcd/" url="http://roy.marples.name/dhcpcd/"
arch=('i686' 'x86_64') arch=('i686' 'x86_64')
@ -16,9 +16,11 @@ depends=('glibc' 'sh')
backup=('etc/conf.d/dhcpcd' 'etc/dhcpcd.conf') backup=('etc/conf.d/dhcpcd' 'etc/dhcpcd.conf')
options=('emptydirs') # We Need the Empty /var/lib/dhcpcd Directory options=('emptydirs') # We Need the Empty /var/lib/dhcpcd Directory
source=("http://roy.marples.name/downloads/$pkgname/$pkgname-$pkgver.tar.bz2" \ source=("http://roy.marples.name/downloads/$pkgname/$pkgname-$pkgver.tar.bz2" \
'dhcpcd.conf.d') 'dhcpcd.conf.d'
'dhcpcd@.service')
sha1sums=('27378a251705c7888332e6d60eea7805d1f8aeb5' sha1sums=('27378a251705c7888332e6d60eea7805d1f8aeb5'
'b67b9ce6a2faaca75fea356966a16be2283b7db0') 'b67b9ce6a2faaca75fea356966a16be2283b7db0'
'3d0542eab1b89a88d56ca427128228ac72c40d1f')
build() { build() {
cd ${srcdir}/${pkgname}-${pkgver} cd ${srcdir}/${pkgname}-${pkgver}
@ -48,4 +50,7 @@ package() {
# Set Options in /etc/dhcpcd.conf # Set Options in /etc/dhcpcd.conf
echo noipv4ll >> ${pkgdir}/etc/dhcpcd.conf || return 1 # Disable ip4vall echo noipv4ll >> ${pkgdir}/etc/dhcpcd.conf || return 1 # Disable ip4vall
# install systemd unit
install -Dm644 "$srcdir/dhcpcd@.service" "$pkgdir/dhcpcd@.service"
} }

13
dhcpcd/dhcpcd@.service Normal file
View File

@ -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