[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200802131242.27907.elendil@planet.nl>
Date: Wed, 13 Feb 2008 12:42:18 +0100
From: Frans Pop <elendil@...net.nl>
To: linux-kernel@...r.kernel.org
Cc: sam@...nborg.org
Subject: [PATCH] kbuild: allow alternative hook script dir in .deb packages
From: Frans Pop <elendil@...net.nl>
Hook scripts in the default directory /etc/kernel are also
executed by packages created using make-kpkg (including official
Debian kernels). Allow to specify an alternative hook scripts
directory by exporting the environment variable KERNELDEBHOOKDIR
so that this can be avoided.
Signed-off-by: Frans Pop <elendil@...net.nl>
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index 2577dec..c76bbf1 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -55,14 +55,17 @@ if grep -q '^CONFIG_MODULES=y' .config ; then
fi
# Install the maintainer scripts
+# Note: hook scripts under /etc/kernel are also executed by kernel packages
+# built using make-kpkg (from the "kernelpackage" package)
+debhookdir=${KERNELDEBHOOKDIR:-/etc/kernel}
for script in postinst postrm preinst prerm ; do
- mkdir -p "$tmpdir/etc/kernel/$script.d"
+ mkdir -p "$tmpdir$debhookdir/$script.d"
cat <<EOF > "$tmpdir/DEBIAN/$script"
#!/bin/sh
set -e
-test -d /etc/kernel/$script.d && run-parts --arg="$version" /etc/kernel/$script.d
+test -d $debhookdir/$script.d && run-parts --arg="$version" $debhookdir/$script.d
exit 0
EOF
chmod 755 "$tmpdir/DEBIAN/$script"
Download attachment "signature.asc " of type "application/pgp-signature" (190 bytes)
Powered by blists - more mailing lists