Commit b171f8f1 authored by Simo Leone's avatar Simo Leone Committed by Gerardo Exequiel Pozzi
Browse files

Make cmdline_param work and conform to rc.d layout

- Rename cmdline_param to kernel_cmdline
- Move to /etc/rc.d/functions.d where it belongs
parent d812cc13
# 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}"
}
# vim: set ft=sh:
. /etc/rc.conf
. /etc/rc.d/functions
. /etc/archiso/functions
scan_network ()
......
# 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
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment