Rewriting live-media checksum verification to work with any SHA and MD5 digests.
[live-boot-grml.git] / scripts / boot / arguments.sh
index 6b4e553..f9e8d33 100755 (executable)
@@ -4,29 +4,25 @@
 
 Arguments ()
 {
-       PRESEEDS=""
-       LOCATIONS=""
-
        for ARGUMENT in $(cat /proc/cmdline)
        do
                case "${ARGUMENT}" in
-                       skipconfig)
-                               NOACCESSIBILITY="Yes"
-                               NOFASTBOOT="Yes"
-                               NOFSTAB="Yes"
-                               NONETWORKING="Yes"
-
-                               export NOACCESSIBILITY NOFASTBOOT NOFSTAB NONETWORKING
+                       live-boot.verify-checksums|verify-checksums)
+                               LIVE_VERIFY_CHECKSUMS="true"
+                               export LIVE_VERIFY_CHECKSUMS
                                ;;
 
-                       access=*)
-                               ACCESS="${ARGUMENT#access=}"
-                               export ACCESS
+                       # parameters below need review
+                       read-only)
+                               READ_ONLY="true"
                                ;;
 
-                       console=*)
-                               DEFCONSOLE="${ARGUMENT#*=}"
-                               export DEFCONSOLE
+                       skipconfig)
+                               NOFASTBOOT="true"
+                               NOFSTAB="true"
+                               NONETWORKING="true"
+
+                               export NOFASTBOOT NOFSTAB NONETWORKING
                                ;;
 
                        BOOTIF=*)
@@ -34,7 +30,7 @@ Arguments ()
                                ;;
 
                        debug)
-                               DEBUG="Yes"
+                               DEBUG="true"
                                export DEBUG
 
                                set -x
@@ -43,12 +39,13 @@ Arguments ()
                        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=*)
@@ -72,11 +69,6 @@ Arguments ()
                                export FINDISO
                                ;;
 
-                       forcepersistencefsck)
-                               FORCEPERSISTENCEFSCK="Yes"
-                               export FORCEPERSISTENCEFSCK
-                               ;;
-
                        ftpfs=*)
                                FTPFS="${ARGUMENT#ftpfs=}"
                                export FTPFS
@@ -106,15 +98,10 @@ Arguments ()
                                ;;
 
                        ignore_uuid)
-                               IGNORE_UUID="Yes"
+                               IGNORE_UUID="true"
                                export IGNORE_UUID
                                ;;
 
-                       integrity-check)
-                               INTEGRITY_CHECK="Yes"
-                               export INTEGRITY_CHECK
-                               ;;
-
                        ip=*)
                                STATICIP="${ARGUMENT#ip=}"
 
@@ -126,11 +113,6 @@ Arguments ()
                                export STATICIP
                                ;;
 
-                       live-getty)
-                               LIVE_GETTY="1"
-                               export LIVE_GETTY
-                               ;;
-
                        live-media=*|bootfrom=*)
                                LIVE_MEDIA="${ARGUMENT#*=}"
                                export LIVE_MEDIA
@@ -176,23 +158,18 @@ Arguments ()
                                export NFS_COW
                                ;;
 
-                       noaccessibility)
-                               NOACCESSIBILITY="Yes"
-                               export NOACCESSIBILITY
-                               ;;
-
                        nofastboot)
-                               NOFASTBOOT="Yes"
+                               NOFASTBOOT="true"
                                export NOFASTBOOT
                                ;;
 
                        nofstab)
-                               NOFSTAB="Yes"
+                               NOFSTAB="true"
                                export NOFSTAB
                                ;;
 
                        nonetworking)
-                               NONETWORKING="Yes"
+                               NONETWORKING="true"
                                export NONETWORKING
                                ;;
 
@@ -201,12 +178,12 @@ Arguments ()
                                ;;
 
                        swapon)
-                               SWAPON="Yes"
+                               SWAPON="true"
                                export SWAPON
                                ;;
 
                        persistence)
-                               PERSISTENCE="Yes"
+                               PERSISTENCE="true"
                                export PERSISTENCE
                                ;;
 
@@ -229,7 +206,7 @@ Arguments ()
                                export PERSISTENCE_PATH
                                ;;
                        persistence-read-only)
-                               PERSISTENCE_READONLY="Yes"
+                               PERSISTENCE_READONLY="true"
                                export PERSISTENCE_READONLY
                                ;;
 
@@ -248,12 +225,12 @@ Arguments ()
                                ;;
 
                        nopersistence)
-                               NOPERSISTENCE="Yes"
+                               NOPERSISTENCE="true"
                                export NOPERSISTENCE
                                ;;
 
                        noprompt)
-                               NOPROMPT="Yes"
+                               NOPROMPT="true"
                                export NOPROMPT
                                ;;
 
@@ -263,34 +240,17 @@ Arguments ()
                                ;;
 
                        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
                                ;;
 
@@ -300,28 +260,28 @@ Arguments ()
                                ;;
 
                        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
                                ;;