summaryrefslogtreecommitdiff
path: root/configs/syslinux-iso/overlay/etc/archiso
diff options
context:
space:
mode:
authorGerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>2011-05-01 17:04:11 -0300
committerGerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>2011-05-01 17:04:11 -0300
commita8c1c0cb6ff5a4c89a3e248f1d18917fc5e73202 (patch)
tree2e6d1073648267648295c933afec7b4558e4a571 /configs/syslinux-iso/overlay/etc/archiso
parent13193bc0ba657ddb22b1013f3ff6b786fe58445c (diff)
downloadarchiso32-a8c1c0cb6ff5a4c89a3e248f1d18917fc5e73202.tar.xz
[syslinux-iso] Fix double execution of initscripts hooks.
Partially revert commit b171f8f11fdc04a22c7b8f3ff3b9dd164986daae Fixes https://bugs.archlinux.org/task/23786 Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
Diffstat (limited to 'configs/syslinux-iso/overlay/etc/archiso')
-rw-r--r--configs/syslinux-iso/overlay/etc/archiso/functions20
1 files changed, 20 insertions, 0 deletions
diff --git a/configs/syslinux-iso/overlay/etc/archiso/functions b/configs/syslinux-iso/overlay/etc/archiso/functions
new file mode 100644
index 0000000..02b41cf
--- /dev/null
+++ b/configs/syslinux-iso/overlay/etc/archiso/functions
@@ -0,0 +1,20 @@
+# vim: set ft=sh:
+
+# kernel_cmdline <param>
+# Looks for a parameter on the kernel's boot-time command line.
+#
+# returns: 0 if param was found. Also prints its value if it was a K=V param.
+# 1 if it was not
+#
+kernel_cmdline ()
+{
+ for param in $(/bin/cat /proc/cmdline); do
+ case "${param}" in
+ $1=*) echo "${param##*=}"; return 0 ;;
+ $1) return 0 ;;
+ *) continue ;;
+ esac
+ done
+
+ return 1
+}