diff options
-rw-r--r-- | main/alpine-baselayout/APKBUILD | 4 | ||||
-rw-r--r-- | main/alpine-baselayout/alpine-baselayout.post-upgrade | 34 |
2 files changed, 36 insertions, 2 deletions
diff --git a/main/alpine-baselayout/APKBUILD b/main/alpine-baselayout/APKBUILD index 15f61d55d6..66edd075d7 100644 --- a/main/alpine-baselayout/APKBUILD +++ b/main/alpine-baselayout/APKBUILD @@ -1,12 +1,12 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=alpine-baselayout pkgver=2.2.0 -pkgrel=0 +pkgrel=1 pkgdesc="Alpine base dir structure and init scripts" url=http://git.alpinelinux.org/cgit/alpine-baselayout depends= options="!fhs" -install="$pkgname.pre-upgrade" +install="$pkgname.pre-upgrade $pkgname.post-upgrade" source="http://git.alpinelinux.org/cgit/$pkgname.git/snapshot/$pkgname-$pkgver.tar.bz2 0001-blacklist-viafb-and-e_powersaver.patch " diff --git a/main/alpine-baselayout/alpine-baselayout.post-upgrade b/main/alpine-baselayout/alpine-baselayout.post-upgrade new file mode 100644 index 0000000000..0010c9bbc7 --- /dev/null +++ b/main/alpine-baselayout/alpine-baselayout.post-upgrade @@ -0,0 +1,34 @@ +#!/bin/sh + +create_vserver_startstop() { + cat <<__EOF__ +#!/bin/sh + +# This file is for compatibility +case \${0##*/} in +rcL) + RUNLEVEL=1 /sbin/rc sysinit || exit 1 + /sbin/rc boot || exit 1 + /sbin/rc \${1:-default} + exit 0 + ;; +rcK) + /sbin/rc shutdown + ;; +esac + +__EOF__ +} + +# create compat start/stop scripts for vserver guests +if [ "$(/sbin/rc --sys)" != "VSERVER" ]; then + # create rcL and rcK| + if ! [ -e /etc/init.d/rcL ]; then + create_vserver_startstop > /etc/init.d/rcL + fi + if ! [ -e /etc/init.d/rcK ]; then + ln -s rcL /etc/init.d/rcK + fi +fi + +exit 0 |