summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbuild3
-rw-r--r--linux-image.pkg/preinst12
2 files changed, 14 insertions, 1 deletions
diff --git a/build b/build
index e02589f..f14ee96 100755
--- a/build
+++ b/build
@@ -24,7 +24,8 @@ install: build
ln -sf /boot/$${img_dest} linux-image.data/$${img_dest}; \
install -D src/System.map \
linux-sysmap.data/boot/System.map; \
- mkdir -p linux-image.data/etc/kernel/postinst.d \
+ mkdir -p linux-image.data/etc/kernel/preinst.d \
+ linux-image.data/etc/kernel/postinst.d \
linux-image.data/etc/kernel/prerm.d \
linux-image.data/etc/kernel/postrm.d; \
fi
diff --git a/linux-image.pkg/preinst b/linux-image.pkg/preinst
new file mode 100644
index 0000000..2275fb7
--- /dev/null
+++ b/linux-image.pkg/preinst
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+first=true
+for arg in "${@}"; do
+ if ${first}; then
+ set --
+ first=false
+ fi
+ set -- "${@}" -a "${arg}"
+done
+
+run-parts "${@}" /etc/kernel/preinst.d