ISO/default-config/etc/archiso/functions
Simo Leone 8dea2b65fc Fixed cmdline_param(), used in rc.conf
Turns out /proc gets mounted after rc.conf is sourced for the first time,
so /proc/cmdline isn't such a great place to be getting parameters from
in rc.conf. Use CMDLINE env variable instead, which is set to mostly the
same thing (well the part we care about, at the least).

Also cmdline_param wasn't breaking out of the loop properly.

Signed-off-by: Simo Leone <simo@archlinux.org>
2007-10-09 20:59:26 -05:00

13 lines
230 B
Bash

# vim: set ft=sh:
cmdline_param ()
{
for param in ${CMDLINE}; do
case "${param}" in
$1=*) echo "${param##*=}"; return ;;
*) continue ;;
esac
done
[ -n "${2}" ] && echo "${2}"
}