#set -e
-Arguments ()
+Cmdline ()
{
- PRESEEDS=""
- LOCATIONS=""
-
- for ARGUMENT in $(cat /proc/cmdline)
+ for _PARAMETER in ${_CMDLINE}
do
- case "${ARGUMENT}" in
- read-only)
- READ_ONLY="true"
+ case "${_PARAMETER}" in
+ live-boot.read-only|read-only)
+ LIVE_READ_ONLY="true"
;;
- skipconfig)
- NOACCESSIBILITY="Yes"
- NOFASTBOOT="Yes"
- NOFSTAB="Yes"
- NONETWORKING="Yes"
+ live-boot.swapon)
+ LIVE_SWAPON="true"
+ ;;
- export NOACCESSIBILITY NOFASTBOOT NOFSTAB NONETWORKING
+ live-boot.verify-checksums|verify-checksums)
+ LIVE_VERIFY_CHECKSUMS="true"
;;
- access=*)
- ACCESS="${ARGUMENT#access=}"
- export ACCESS
+ # Special options
+ live-boot.debug|debug)
+ LIVE_DEBUG="true"
;;
- console=*)
- DEFCONSOLE="${ARGUMENT#*=}"
- export DEFCONSOLE
+
+ # parameters below need review (FIXME)
+ skipconfig)
+ NOFSTAB="true"
+ NONETWORKING="true"
+
+ export NOFSTAB NONETWORKING
;;
BOOTIF=*)
BOOTIF="${x#BOOTIF=}"
;;
- debug)
- DEBUG="Yes"
- export DEBUG
-
- set -x
- ;;
-
dhcp)
# Force dhcp even while netbooting
# Use for debugging in case somebody works on fixing dhclient
- DHCP="Force";
+ DHCP="true";
export DHCP
;;
nodhcp)
- unset DHCP
+ DHCP=""
+ export DHCP
;;
ethdevice=*)
export FINDISO
;;
- forcepersistencefsck)
- FORCEPERSISTENCEFSCK="Yes"
- export FORCEPERSISTENCEFSCK
- ;;
-
ftpfs=*)
FTPFS="${ARGUMENT#ftpfs=}"
export FTPFS
;;
ignore_uuid)
- IGNORE_UUID="Yes"
+ IGNORE_UUID="true"
export IGNORE_UUID
;;
- integrity-check)
- INTEGRITY_CHECK="Yes"
- export INTEGRITY_CHECK
- ;;
-
ip=*)
STATICIP="${ARGUMENT#ip=}"
export STATICIP
;;
- live-getty)
- LIVE_GETTY="1"
- export LIVE_GETTY
- ;;
-
live-media=*|bootfrom=*)
LIVE_MEDIA="${ARGUMENT#*=}"
export LIVE_MEDIA
export NFS_COW
;;
- noaccessibility)
- NOACCESSIBILITY="Yes"
- export NOACCESSIBILITY
- ;;
-
- nofastboot)
- NOFASTBOOT="Yes"
- export NOFASTBOOT
- ;;
-
nofstab)
- NOFSTAB="Yes"
+ NOFSTAB="true"
export NOFSTAB
;;
nonetworking)
- NONETWORKING="Yes"
+ NONETWORKING="true"
export NONETWORKING
;;
ramdisk_size="${ARGUMENT#ramdisk-size=}"
;;
- swapon)
- SWAPON="Yes"
- export SWAPON
- ;;
-
persistence)
- PERSISTENCE="Yes"
+ PERSISTENCE="true"
export PERSISTENCE
;;
export PERSISTENCE_PATH
;;
persistence-read-only)
- PERSISTENCE_READONLY="Yes"
+ PERSISTENCE_READONLY="true"
export PERSISTENCE_READONLY
;;
;;
nopersistence)
- NOPERSISTENCE="Yes"
+ NOPERSISTENCE="true"
export NOPERSISTENCE
;;
noprompt)
- NOPROMPT="Yes"
+ NOPROMPT="true"
export NOPROMPT
;;
;;
quickusbmodules)
- QUICKUSBMODULES="Yes"
+ QUICKUSBMODULES="true"
export QUICKUSBMODULES
;;
- preseed/file=*|file=*)
- LOCATIONS="${ARGUMENT#*=} ${LOCATIONS}"
- export LOCATIONS
- ;;
-
- nopreseed)
- NOPRESEED="Yes"
- export NOPRESEED
- ;;
-
- */*=*)
- question="${ARGUMENT%%=*}"
- value="${ARGUMENT#*=}"
- PRESEEDS="${PRESEEDS}\"${question}=${value}\" "
- export PRESEEDS
- ;;
-
showmounts)
- SHOWMOUNTS="Yes"
+ SHOWMOUNTS="true"
export SHOWMOUNTS
;;
silent)
- SILENT="Yes"
+ SILENT="true"
export SILENT
;;
;;
toram)
- TORAM="Yes"
+ TORAM="true"
export TORAM
;;
toram=*)
- TORAM="Yes"
+ TORAM="true"
MODULETORAM="${ARGUMENT#toram=}"
export TORAM MODULETORAM
;;
exposedroot)
- EXPOSED_ROOT="Yes"
+ EXPOSED_ROOT="true"
export EXPOSED_ROOT
;;
plainroot)
- PLAIN_ROOT="Yes"
+ PLAIN_ROOT="true"
export PLAIN_ROOT
;;
skipunion)
- SKIP_UNION_MOUNTS="Yes"
+ SKIP_UNION_MOUNTS="true"
export SKIP_UNION_MOUNTS
;;