diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2019-10-27 14:54:32 +0100 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2019-10-27 15:03:53 +0100 |
commit | 469339a67b6170ab42867aeb2785a99758366bec (patch) | |
tree | 08c89a57a5afe7ad1936288896f1d569efa4d013 | |
parent | 4c01f692ab976dc34babde6c46a3e76833af58cf (diff) | |
download | aports-469339a67b6170ab42867aeb2785a99758366bec.tar.bz2 aports-469339a67b6170ab42867aeb2785a99758366bec.tar.xz |
main/dhcp: simplify openrc split function, remove unneeded workaround
-rw-r--r-- | main/dhcp/APKBUILD | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/main/dhcp/APKBUILD b/main/dhcp/APKBUILD index e952f09a3c..6391e21cd9 100644 --- a/main/dhcp/APKBUILD +++ b/main/dhcp/APKBUILD @@ -14,7 +14,6 @@ depends_static="$pkgname-dev" # busybox utils are not sufficient depends_dhclient="coreutils iproute2 run-parts" depends_dhcrelay="" # do not inherit depends from $pkgname -depends_openrc="" # do not inherit depends from $pkgname pkgusers="dhcp" pkggroups="dhcp" makedepends="krb5-dev linux-headers openldap-dev perl" @@ -107,13 +106,6 @@ check() { package() { cd "$builddir" - install -m755 -D "$srcdir"/dhcpd.initd "$pkgdir"/etc/init.d/dhcpd - install -m644 -D "$srcdir"/dhcpd.confd "$pkgdir"/etc/conf.d/dhcpd - mv "$pkgdir"/etc "$pkgdir/etc.$pkgname" - install -m755 -D "$srcdir"/dhcrelay.initd "$pkgdir"/etc/init.d/dhcrelay - install -m644 -D "$srcdir"/dhcrelay.confd "$pkgdir"/etc/conf.d/dhcrelay - mv "$pkgdir"/etc "$pkgdir"/etc.dhcrelay - make DESTDIR="$pkgdir" install #install -m751 -D "$builddir"/client/scripts/linux "$pkgdir"/sbin/dhclient-script @@ -123,21 +115,13 @@ package() { } openrc() { - local _name _etcdir _dir - depends="$depends_openrc" - - _name="${subpkgname%-openrc}" - _etcdir="$pkgdir/etc.$_name" - for _dir in conf.d init.d; do - if [ -d "$_etcdir/$_dir" ]; then - mkdir -p "$pkgdir"/etc - mv "$_etcdir/$_dir" "$pkgdir"/etc/ - fi - done - rmdir "$_etcdir" || : + local name="${subpkgname%-openrc}" + [ "$name" = dhcp ] && name="dhcpd" + + install -m755 -D "$srcdir"/$name.initd "$pkgdir"/etc/init.d/$name + install -m644 -D "$srcdir"/$name.confd "$pkgdir"/etc/conf.d/$name default_openrc - install_if="openrc $_name=$pkgver-r$pkgrel" } server_ldap() { |