* config_swraid: add usage info how to disable it, check for 0.5-20
authorMichael Prokop <mika@grml.org>
Thu, 2 Nov 2006 19:37:25 +0000 (20:37 +0100)
committerMichael Prokop <mika@grml.org>
Thu, 2 Nov 2006 19:37:25 +0000 (20:37 +0100)
  bootoption raid=noautodetect as well.
* Added some more checks for bootoption 'forensic' for users
  who don't know that forensic should be the image name and not
  an additional bootoption.

autoconfig.functions
debian/changelog
grml-autoconfig

index 7a8e397..f8af3db 100755 (executable)
@@ -937,9 +937,13 @@ fi
 
 # {{{ Start creating /etc/fstab with HD partitions and USB SCSI devices now
 config_fstab(){
 
 # {{{ Start creating /etc/fstab with HD partitions and USB SCSI devices now
 config_fstab(){
+
 NOSWAP=""
 NOSWAP=""
-checkbootparam "noswap" && NOSWAP="yes"
-if checkbootparam "nofstab"; then
+if checkbootparam "noswap" -o checkbootparam "forensic" ; then
+   NOSWAP="yes"
+fi
+
+if checkbootparam "nofstab" -o checkbootparam "forensic" ; then
   ewarn "Skipping /etc/fstab creation as requested on boot commandline." ; eend 0
 else
   checkbootparam "anyswap" && export ANYSWAP='yes' || export ANYSWAP=""
   ewarn "Skipping /etc/fstab creation as requested on boot commandline." ; eend 0
 else
   checkbootparam "anyswap" && export ANYSWAP='yes' || export ANYSWAP=""
@@ -1708,7 +1712,7 @@ fi
 }
 
 config_automount(){
 }
 
 config_automount(){
-if checkbootparam noautoconfig ; then
+if checkbootparam noautoconfig -o checkbootparam forensic ; then
   ewarn "Skipping running automount of device(s) labeled GRMLCFG as requested." ; eend 0
 else
  if [ -z "$INSTALLED" ] ; then
   ewarn "Skipping running automount of device(s) labeled GRMLCFG as requested." ; eend 0
 else
  if [ -z "$INSTALLED" ] ; then
@@ -1989,14 +1993,15 @@ fi
 # {{{ SW-RAID
 config_swraid(){
   if [ -z "$INSTALLED" ] ; then
 # {{{ SW-RAID
 config_swraid(){
   if [ -z "$INSTALLED" ] ; then
-  if checkbootparam "noraid" -o checkbootparam "forensic" ; then
+  # notice: checkbootparam "forensic" is just for users who don't know how to really use the bootoption
+  if checkbootparam "noraid" -o checkbootparam "forensic" -o checkbootparam "raid=noautodetect" ; then
      ewarn "Skipping search for SW-RAID as requested on boot commandline." ; eend 0
   else
     if ! [ -x /sbin/mdadm ] ; then
        eerror "mdadm not available, can not execute it." ; eend 1
     else
 
      ewarn "Skipping search for SW-RAID as requested on boot commandline." ; eend 0
   else
     if ! [ -x /sbin/mdadm ] ; then
        eerror "mdadm not available, can not execute it." ; eend 1
     else
 
-       einfo "Searching for software RAID arrays:"
+       einfo "Searching for software RAID arrays (disable via bootoption noraid):"
        eindent
          IFSOLD=${IFS:-}
          IFS='
        eindent
          IFSOLD=${IFS:-}
          IFS='
index 0635552..fb83a73 100644 (file)
@@ -1,3 +1,13 @@
+grml-autoconfig (0.5-20) unstable; urgency=low
+
+  * config_swraid: add usage info how to disable it, check for
+    bootoption raid=noautodetect as well.
+  * Added some more checks for bootoption 'forensic' for users
+    who don't know that forensic should be the image name and not
+    an additional bootoption.
+
+ -- Michael Prokop <mika@grml.org>  Thu,  2 Nov 2006 20:19:11 +0100
+
 grml-autoconfig (0.5-19) unstable; urgency=low
 
   * Added function config_swraid ($CONFIG_SWRAID) for detection
 grml-autoconfig (0.5-19) unstable; urgency=low
 
   * Added function config_swraid ($CONFIG_SWRAID) for detection
index 9505e22..f663cd5 100755 (executable)
@@ -78,6 +78,15 @@ else
   echo "6" > /proc/sys/kernel/printk ; eend $?
 fi
 
   echo "6" > /proc/sys/kernel/printk ; eend $?
 fi
 
+if checkbootparam "forensic" ; then
+   eerror "Bootopion forensic found. Important notice!"
+   eerror " Do *not* boot with something like 'grml forensic ...' but with 'forensic ...' instead!"
+   eerror " To avoid damage to your system a debugshell will be started after a delay of 10 seconds." ; eend 1
+   eerror " If you want to continue booting just exit the shell, but think about what you are doing!" ; eend 1
+   sleep 10
+   rundebugshell
+fi
+
 [ -n "$SPLASH" ] && /usr/bin/grml-bootsplash "|">/dev/tty7
 
 checkvalue $CONFIG_LANGUAGE && config_language
 [ -n "$SPLASH" ] && /usr/bin/grml-bootsplash "|">/dev/tty7
 
 checkvalue $CONFIG_LANGUAGE && config_language