diff options
author | Simo Leone <leone.simo@gmail.com> | 2011-03-02 04:43:31 -0800 |
---|---|---|
committer | Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> | 2011-03-20 16:51:39 -0300 |
commit | b171f8f11fdc04a22c7b8f3ff3b9dd164986daae (patch) | |
tree | d9cb03f897422dbf52e058a73081d7a51e351052 /configs/syslinux-iso/overlay/etc/rc.d | |
parent | d812cc131ee23cfe234f6f2e6137427afbeebb31 (diff) |
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
Diffstat (limited to 'configs/syslinux-iso/overlay/etc/rc.d')
-rwxr-xr-x | configs/syslinux-iso/overlay/etc/rc.d/archiso | 1 | ||||
-rw-r--r-- | configs/syslinux-iso/overlay/etc/rc.d/functions.d/archiso | 20 |
2 files changed, 20 insertions, 1 deletions
diff --git a/configs/syslinux-iso/overlay/etc/rc.d/archiso b/configs/syslinux-iso/overlay/etc/rc.d/archiso index bbe71bf..9734412 100755 --- a/configs/syslinux-iso/overlay/etc/rc.d/archiso +++ b/configs/syslinux-iso/overlay/etc/rc.d/archiso @@ -1,7 +1,6 @@ # vim: set ft=sh: . /etc/rc.conf . /etc/rc.d/functions -. /etc/archiso/functions scan_network () diff --git a/configs/syslinux-iso/overlay/etc/rc.d/functions.d/archiso b/configs/syslinux-iso/overlay/etc/rc.d/functions.d/archiso new file mode 100644 index 0000000..02b41cf --- /dev/null +++ b/configs/syslinux-iso/overlay/etc/rc.d/functions.d/archiso @@ -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 +} |