Support LVM
authorMichael Prokop <mika@grml.org>
Sun, 1 Jul 2007 18:36:50 +0000 (20:36 +0200)
committerMichael Prokop <mika@grml.org>
Sun, 1 Jul 2007 18:36:50 +0000 (20:36 +0200)
autoconfig
autoconfig.functions
autoconfig.small
debian/changelog
grml-autoconfig

index fd02c67..6373ab4 100644 (file)
@@ -3,7 +3,7 @@
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2.
-# Latest change: Mon Apr 16 19:33:47 CEST 2007 [mika]
+# Latest change: Son Jul 01 20:35:13 CEST 2007 [mika]
 ################################################################################
 
 ################################################################################
@@ -86,6 +86,7 @@ CONFIG_LANGUAGE='yes'         # allow language specification via commandline
 CONFIG_LD_MOD='yes'           # run ldconfig and depmod on systems running from harddisk; remove /etc/grml.first.boot for forcing
 CONFIG_LOCAL_NET='yes'        # bring up loopback interface
 CONFIG_LOG='yes'              # DEBUG=/dev/null or logfile int /tmp/...
+CONFIG_LVM='yes'              # logical volume setup
 CONFIG_MIXER='yes'            # set audio volumes [only in live-cd mode relevant, except for bootoption nosound]
 CONFIG_MODEM='yes'            # check for AC'97 Modem Controller modem
 CONFIG_MODULES='yes'          # load modules specified in /etc/grml/modules
index 6909dcc..1707c5f 100755 (executable)
@@ -4,7 +4,7 @@
 # Authors:       grml-team (grml.org), (c) Klaus Knopper <knopper@knopper.net>, (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2.
-# Latest change: Sam Mai 12 00:46:15 CEST 2007 [mika]
+# Latest change: Son Jul 01 20:34:14 CEST 2007 [mika]
 ################################################################################
 
 # {{{ path, variables, signals, umask, zsh
@@ -2044,6 +2044,33 @@ config_swraid(){
 }
 # }}}
 
+# {{{ LVM (Logical Volumes)
+config_lvm(){
+  if [ -z "$INSTALLED" ] ; then
+  # notice: checkbootparam "forensic" is just for users who don't know how to really use the bootoption
+  if checkbootparam 'nolvm' ; then
+     ewarn "Skipping LVM code as requested on boot commandline." ; eend 0
+  else
+    if ! [ -x /sbin/lvm -a -x /etc/init.d/lvm2 -a -x /sbin/lvdisplay ] ; then
+       eerror "LVM not available, can not execute it." ; eend 1
+    else
+       if lvdisplay 1>/dev/null 2>&1 ; then
+         einfo "You seem to have logical volumes (LVM) on your system."
+          eindent
+          einfo "Just run 'Start lvm2' to activate them or boot using 'lvm' as bootoption for autostart."
+         eend 0
+          if checkbootparam 'lvm' ; then
+             einfo "Bootoption LVM found. Searching for logical volumes:"
+            /etc/init.d/lvm2 start ; eend $?
+         fi
+          eoutdent
+       fi
+    fi # check for lvm binary
+  fi # check for bootoption nolvm
+  fi # run only in live-cd mode
+}
+# }}}
+
 # {{{ debnet: setup network based on an existing one found on a partition
 config_debnet(){
 if checkbootparam "debnet" ; then
index 0ae1dbe..c459169 100644 (file)
@@ -3,7 +3,7 @@
 # Authors:       grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2.
-# Latest change: Mon Apr 16 19:33:45 CEST 2007 [mika]
+# Latest change: Son Jul 01 20:35:11 CEST 2007 [mika]
 ################################################################################
 
 ################################################################################
@@ -86,6 +86,7 @@ CONFIG_LANGUAGE='yes'         # allow language specification via commandline
 CONFIG_LD_MOD='yes'           # run ldconfig and depmod on systems running from harddisk; remove /etc/grml.first.boot for forcing
 CONFIG_LOCAL_NET='yes'        # bring up loopback interface
 CONFIG_LOG='yes'              # DEBUG=/dev/null or logfile int /tmp/...
+CONFIG_LVM='yes'              # logical volume setup
 CONFIG_MIXER='no'             # set audio volumes [only in live-cd mode relevant, except for bootoption nosound]
 CONFIG_MODEM='yes'            # check for AC'97 Modem Controller modem
 CONFIG_MODULES='yes'          # load modules specified in /etc/grml/modules
index 818f2e3..b008a3a 100644 (file)
@@ -1,3 +1,14 @@
+grml-autoconfig (0.7.4) unstable; urgency=low
+
+  * support LVM (logical volumes):
+    - bootoption 'lvm' activates them
+    - no special bootoption just runs 'lvdisplay' and if something
+      can be found the user gets a hint to execute 'Start lvm2' to
+      set it up
+    - bootoption 'nolvm' completely disables the lvm code/checks
+
+ -- Michael Prokop <mika@grml.org>  Sun, 01 Jul 2007 20:35:30 +0200
+
 grml-autoconfig (0.7.3) unstable; urgency=low
 
   * language-functions: support dvorak keyboard layout [Closes: issue227]
index c59dcc3..e9e692f 100755 (executable)
@@ -127,6 +127,8 @@ checkvalue $CONFIG_ENVIRONMENT && config_environment
 
 checkvalue $CONFIG_SWRAID && config_swraid
 
+checkvalue $CONFIG_LVM && config_lvm
+
 # No kernel messages while probing modules
 echo "0" > /proc/sys/kernel/printk