summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbuild2
-rw-r--r--linux-image.pkg/postinst12
-rw-r--r--linux-image.pkg/postrm12
3 files changed, 26 insertions, 0 deletions
diff --git a/build b/build
index b08fa96..b21e1fd 100755
--- a/build
+++ b/build
@@ -22,6 +22,8 @@ install:
linux-image.data/boot/$${img_dest}; \
install -D src/System.map \
linux-sysmap.data/boot/System.map; \
+ mkdir -p linux-image.data/etc/kernel/postinst.d \
+ linux-image.data/etc/kernel/postrm.d; \
fi
oh-autoinstall -T headers_install -- INSTALL_HDR_PATH="$${PWD}/dest/usr"
find dest/usr/include \
diff --git a/linux-image.pkg/postinst b/linux-image.pkg/postinst
new file mode 100644
index 0000000..9b615b4
--- /dev/null
+++ b/linux-image.pkg/postinst
@@ -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/postinst.d
diff --git a/linux-image.pkg/postrm b/linux-image.pkg/postrm
new file mode 100644
index 0000000..ca0e0cb
--- /dev/null
+++ b/linux-image.pkg/postrm
@@ -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/postrm.d