diff options
Diffstat (limited to 'main/openrc')
-rw-r--r-- | main/openrc/APKBUILD | 11 | ||||
-rw-r--r-- | main/openrc/modloop.initd | 16 |
2 files changed, 20 insertions, 7 deletions
diff --git a/main/openrc/APKBUILD b/main/openrc/APKBUILD index 9432b935ec..6c5b1f8e03 100644 --- a/main/openrc/APKBUILD +++ b/main/openrc/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=openrc pkgver=0.6.1 -pkgrel=0 +pkgrel=1 pkgdesc="OpenRC manages the services, startup and shutdown of a host" url="http://roy.marples.name/openrc" license='BSD-2' @@ -18,6 +18,7 @@ source="http://roy.marples.name/downloads/$pkgname/$pkgname-$pkgver.tar.bz2 modloop.initd networking.initd local.start + modloop.confd " prepare() { @@ -49,7 +50,8 @@ package() { j=${i##*/} install -Dm755 $i "$pkgdir"/etc/init.d/${j%.initd} done - + + install -D -m644 "$srcdir"/modloop.confd "$pkgdir"/etc/conf.d/modloop install -Dm644 ../local.start "$pkgdir"/etc/conf.d/local.start } @@ -60,6 +62,7 @@ c32e15b0858eef708497e7ee6355a055 hostname.initd b1e64885f301166df30be3e3cf5338ff hwdrivers.initd 33ca3e558c42cdd17adccbc7807298f7 keymaps.initd 098a1f16812f56fcb56eb6b6f0fa31f6 modules.initd -4c69d1c6a84cbe0195496c14a757579b modloop.initd +80b3989370c8bf5cf23e65cd924f9846 modloop.initd c05fc2ea5d771ca68cbb8d91494c9a2b networking.initd -0a615d93aab691364c03539c3b496dcc local.start" +0a615d93aab691364c03539c3b496dcc local.start +c1ec888202d868710b5749f7b217d1e3 modloop.confd" diff --git a/main/openrc/modloop.initd b/main/openrc/modloop.initd index cf46c98df0..3cb62732ee 100644 --- a/main/openrc/modloop.initd +++ b/main/openrc/modloop.initd @@ -63,10 +63,20 @@ start() { fi mkdir -p /.modloop /lib - mount -o loop,ro -t cramfs $alpine_mnt/$modloop /.modloop &&\ - rm -rf /lib/modules &&\ - ln -sf /.modloop/modules /lib/ + mount -o loop,ro -t cramfs $alpine_mnt/$modloop /.modloop + eend $? || return 1 + + #use unionfs is available and configured + if grep -q -w "unionfs$" /proc/filesystems && [ -n "$unionfs_size" ]; then + ebegin "UnionFS detected. Mounting modloop rw" + mkdir -p /.modunisonfs/modules /lib/modules + mount -t tmpfs -o size="$unionfs_size" tmpfs /.modunisonfs/modules + mount -t unionfs -o dirs=/.modunisonfs/modules=rw:/.modloop/modules=ro unionfs /lib/modules + eend $? || return 1 + else + rm -rf /lib/modules && ln -sf /.modloop/modules /lib/ + fi # copy firmware if there are any if [ -d $alpine_mnt/firmware ]; then |