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>
This commit is contained in:
parent
5fa747b6cb
commit
8dea2b65fc
@ -2,10 +2,9 @@
|
||||
|
||||
cmdline_param ()
|
||||
{
|
||||
read cmdline < /proc/cmdline
|
||||
for param in ${cmdline}; do
|
||||
for param in ${CMDLINE}; do
|
||||
case "${param}" in
|
||||
$1=*) echo "${param##*=}"; break ;;
|
||||
$1=*) echo "${param##*=}"; return ;;
|
||||
*) continue ;;
|
||||
esac
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user