On Sat, Dec 17, 2011 at 12:08:36AM +0100, JA Magallon wrote:
> If its is (d)ash:
> 
> CMDLINE=$(cat /proc/cmdline)

Or save two fork+execs this way, on dash or bash:

read CMDLINE </proc/cmdline

> case "${CMDLINE}" in
>     *" nokmsboot "*)
>         echo YES
>         ;;
> esac
> 
> if if uses bash:
> 
> CMDLINE=$(cat /proc/cmdline)
> if [[ "${CMDLINE}" == *" nokmsboot "* ]]
> then
>     echo YES
> fi

>>> Dan

Reply via email to