From ebfe96355b4d0b48d126a7382b62089faa96a210 Mon Sep 17 00:00:00 2001 From: tcely Date: Fri, 3 May 2019 12:51:18 -0400 Subject: main/dhcp: fix install_if for -openrc subpackages --- main/dhcp/APKBUILD | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'main/dhcp') diff --git a/main/dhcp/APKBUILD b/main/dhcp/APKBUILD index 26d87fc608..b3d905f78e 100644 --- a/main/dhcp/APKBUILD +++ b/main/dhcp/APKBUILD @@ -125,18 +125,21 @@ dbg() { } openrc() { + local _name _etcdir _dir depends="$depends_openrc" - local dir _etcdir="$pkgdir/etc.${subpkgname%-openrc}" - for dir in conf.d init.d; do - if [ -d "$_etcdir/$dir" ]; then + _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/ + mv "$_etcdir/$_dir" "$pkgdir"/etc/ fi done rmdir "$_etcdir" || : default_openrc + install_if="openrc ${_name}=$pkgver-r$pkgrel" } server_empty() { -- cgit v1.2.3