aboutsummaryrefslogtreecommitdiffstats
path: root/main/mkinitfs
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2015-11-24 09:37:00 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2015-11-24 09:37:00 +0000
commit7b5319cd2b7a3f7f63a93266a6194adb4d14a29d (patch)
treea9a2b4df2e6b943ceac4dd83b924a8c1caee11ee /main/mkinitfs
parentc38fb8365243c90c44a0362791f67dd02b5f8356 (diff)
downloadaports-7b5319cd2b7a3f7f63a93266a6194adb4d14a29d.tar.bz2
aports-7b5319cd2b7a3f7f63a93266a6194adb4d14a29d.tar.xz
main/mkinitfs: make sure nlplug-findfs are included in initramfs
If user had a modified /etc/mkinitfs/features.d/base.files we may not get the needed nlplug-findfs. Use post-* script to verify it is actually there. fixes #4873
Diffstat (limited to 'main/mkinitfs')
-rw-r--r--main/mkinitfs/APKBUILD4
-rw-r--r--main/mkinitfs/mkinitfs.post-install8
l---------main/mkinitfs/mkinitfs.post-upgrade1
3 files changed, 11 insertions, 2 deletions
diff --git a/main/mkinitfs/APKBUILD b/main/mkinitfs/APKBUILD
index 8d1c1229e8..eefd14f194 100644
--- a/main/mkinitfs/APKBUILD
+++ b/main/mkinitfs/APKBUILD
@@ -2,12 +2,12 @@
pkgname=mkinitfs
pkgver=2.8.0_git20151024
_ver=${pkgver%_git*}
-pkgrel=1
+pkgrel=2
pkgdesc="Tool to generate initramfs images for Alpine"
url=http://git.alpinelinux.org/cgit/mkinitfs
makedepends="kmod-dev util-linux-dev linux-headers"
depends="acct busybox apk-tools>=2.0 lddtree>=1.25"
-install="$pkgname.pre-upgrade"
+install="$pkgname.pre-upgrade $pkgname.post-install $pkgname.post-upgrade"
triggers="$pkgname.trigger=/usr/share/kernel/*"
source="http://dev.alpinelinux.org/archive/$pkgname/$pkgname-$_ver.tar.xz
git.patch
diff --git a/main/mkinitfs/mkinitfs.post-install b/main/mkinitfs/mkinitfs.post-install
new file mode 100644
index 0000000000..a2a404b097
--- /dev/null
+++ b/main/mkinitfs/mkinitfs.post-install
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+# safety. if nlplug-findfs is missing in the initramfs image we may end up
+# with an unbootable system.
+
+if ! grep -q -w /sbin/nlplug-findfs /etc/mkinitfs/features.d/base.files; then
+ echo "/sbin/nlplug-findfs" >> /etc/mkinitfs/features.d/base.files
+fi
diff --git a/main/mkinitfs/mkinitfs.post-upgrade b/main/mkinitfs/mkinitfs.post-upgrade
new file mode 120000
index 0000000000..78caf2e57e
--- /dev/null
+++ b/main/mkinitfs/mkinitfs.post-upgrade
@@ -0,0 +1 @@
+mkinitfs.post-install \ No newline at end of file