summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormaximilian attems <maks@debian.org>2009-10-01 00:06:08 +0200
committermaximilian attems <maks@debian.org>2009-10-01 00:06:44 +0200
commit3158f6513227b63efd672505592ab537e043212c (patch)
tree34c7ece279079638f4b78dd4bb89038c45e22936
parent339235ef8fc662c5ac29a4906680cf839f0fb711 (diff)
downloadinitramfs-tools-3158f6513227b63efd672505592ab537e043212c.tar.gz
initramfs-tools-3158f6513227b63efd672505592ab537e043212c.zip
kernel hook scripts: add comments
try to make the intention of the code more clear Reported-by: Matthijs Kooijman <matthijs@stdin.nl> Signed-off-by: maximilian attems <maks@debian.org>
-rwxr-xr-xkernel/postinst.d/initramfs-tools2
-rwxr-xr-xkernel/postrm.d/initramfs-tools2
2 files changed, 4 insertions, 0 deletions
diff --git a/kernel/postinst.d/initramfs-tools b/kernel/postinst.d/initramfs-tools
index b4b286d..68124f7 100755
--- a/kernel/postinst.d/initramfs-tools
+++ b/kernel/postinst.d/initramfs-tools
@@ -12,10 +12,12 @@ if [ -n "$2" ]; then
bootdir=$(dirname "$2")
bootopt="-b ${bootdir}"
else
+ # official Debian linux-images take care themself
exit 0
fi
fi
+# avoid running multiple times
if [ -n "$DEB_MAINT_PARAMS" ]; then
eval set -- "$DEB_MAINT_PARAMS"
if [ -z "$1" ] || [ "$1" != "configure" ]; then
diff --git a/kernel/postrm.d/initramfs-tools b/kernel/postrm.d/initramfs-tools
index 269650a..7811589 100755
--- a/kernel/postrm.d/initramfs-tools
+++ b/kernel/postrm.d/initramfs-tools
@@ -12,10 +12,12 @@ if [ -n "$2" ]; then
bootdir=$(dirname "$2")
bootopt="-b ${bootdir}"
else
+ # official linux-images take care themself
exit 0
fi
fi
+# avoid running multiple times
if [ -n "$DEB_MAINT_PARAMS" ]; then
eval set -- "$DEB_MAINT_PARAMS"
if [ -z "$1" ] || [ "$1" != "remove" ]; then