Chinaunix首页 | 论坛 | 博客
  • 博客访问: 640272
  • 博文数量: 90
  • 博客积分: 10010
  • 博客等级: 上将
  • 技术积分: 2018
  • 用 户 组: 普通用户
  • 注册时间: 2007-03-03 13:09
文章分类

全部博文(90)

文章存档

2010年(7)

2009年(23)

2008年(60)

我的朋友

分类: LINUX

2008-11-11 13:19:58

# Parse command line options
for x in $(cat /proc/cmdline); do
        case $x in
        init=*)
                init=${x#init=}
                ;;
        root=*)
                ROOT=${x#root=}
                case $ROOT in
                LABEL=*)
                        ROOT="/dev/disk/by-label/${ROOT#LABEL=}"
                        ;;
                UUID=*)
                        ROOT="/dev/disk/by-uuid/${ROOT#UUID=}"
                        ;;
                /dev/nfs)
                        [ -z "${BOOT}" ] && BOOT=nfs
                        ;;
                esac
                ;;
        rootflags=*)
                ROOTFLAGS="-o ${x#rootflags=}"
                ;;
        rootfstype=*)
                ROOTFSTYPE="${x#rootfstype=}"
                ;;
        rootdelay=*)
                ROOTDELAY="${x#rootdelay=}"
                case ${ROOTDELAY} in
                *[![:digit:].]*)
                        ROOTDELAY=
                        ;;
                esac
                ;;
        resumedelay=*)
               RESUMEDELAY="${x#resumedelay=}"
                ;;
        loop=*)
                LOOP="${x#loop=}"
                ;;
        loopflags=*)
                LOOPFLAGS="-o ${x#loopflags=}"
                ;;
        loopfstype=*)
                LOOPFSTYPE="${x#loopfstype=}"
                ;;
        cryptopts=*)
                cryptopts="${x#cryptopts=}"
                ;;
        nfsroot=*)
                NFSROOT="${x#nfsroot=}"
                ;;
        netboot=*)
                NETBOOT="${x#netboot=}"
                ;;
        ip=*)
                IPOPTS="${x#ip=}"
                ;;
        boot=*)
                BOOT=${x#boot=}
                ;;
        resume=*)
                RESUME="${x#resume=}"
                ;;
        resume_offset=*)
                resume_offset="${x#resume_offset=}"
                ;;
        noresume)
                noresume=y
                ;;
        panic=*)
                panic="${x#panic=}"
                case ${panic} in
                *[![:digit:].]*)
                        panic=
                        ;;
                esac
                ;;
        quiet)
                quiet=y
                ;;
        ro)
                readonly=y
                ;;
        rw)
                readonly=n
                ;;
        debug)
                debug=y
                quiet=n
                exec >/tmp/initramfs.debug 2>&1
                set -x
                ;;
        debug=*)
                debug=y
                quiet=n
                set -x
                ;;
        break=*)
                break=${x#break=}
                ;;
        break)
                break=premount
                ;;
      blacklist=*)
                blacklist=${x#blacklist=}
                ;;
        esac
done

阅读(1424) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~