+# {{{ 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
+ # Debian etch provides /etc/init.d/lvm only, newer suites provide /etc/init.d/lvm2
+ if ! [ -x /sbin/lvm -a -x /sbin/lvdisplay ] || ! [ -x /etc/init.d/lvm2 -o -x /etc/init.d/lvm ] ; then
+ eerror "LVM not available, can not execute it." ; eend 1
+ else
+ if lvdisplay 2>&1 | grep -v 'No volume groups found' 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
+}
+# }}}
+