Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/default-config/etc/archiso/functions
diff options
context:
space:
mode:
Diffstat (limited to 'default-config/etc/archiso/functions')
-rw-r--r--default-config/etc/archiso/functions24
1 files changed, 13 insertions, 11 deletions
diff --git a/default-config/etc/archiso/functions b/default-config/etc/archiso/functions
index 2972013..d668b4c 100644
--- a/default-config/etc/archiso/functions
+++ b/default-config/etc/archiso/functions
@@ -1,11 +1,13 @@
-# vim: set ft=sh:
-cmdline_param ()
-{
- while param do;
- case "${param}" in
- $1=*) echo "${param##*=}"; break ;;
- *) continue ;;
- esac
- echo "${2}"
- done < read /proc/cmdline
-}
+# vim: set ft=sh:
+
+cmdline_param ()
+{
+ read cmdline < /proc/cmdline
+ for param in ${cmdline}; do
+ case "${param}" in
+ $1=*) echo "${param##*=}"; break ;;
+ *) continue ;;
+ esac
+ done
+ [ -n "${2}" ] && echo "${2}"
+}