Accessing boot: prompt options inside KS script

Mike McLean mikem.rtp at gmail.com
Sun May 22 18:49:53 UTC 2005


> Excessive sloping matchstick substitutions in sed make my eyes water - I
> find it conceptually easier to break at whitespace into separate lines:

I just use bash itself.  It's a little more typing, but more adaptable
and readable.

set -- $(cat /proc/cmdline)
for arg in "$@"; do
    case $arg in
        ip=*)
            ip=${arg#ip=}
            ;;
    esac
done

Of course, you could use --interpreter /usr/bin/python, in which case,
you'd have:

for arg in open('/proc/cmdline').read().split():
    if arg[0:3] == "ip=":
        ip = arg[3:]




More information about the Kickstart-list mailing list