X-Git-Url: https://git.grml.org/?p=grml-autoconfig.git;a=blobdiff_plain;f=autoconfig.functions;h=1707c5f049bd8dcb71c3831986ad4b27439b8715;hp=6909dccd90dfc78db59e452b1126763a262effb8;hb=c9673f53bab9118d1a6eaae9fa2ce803c590bea0;hpb=bf90667a39a960d73f66044f2da2a72e10ea48f0;ds=sidebyside diff --git a/autoconfig.functions b/autoconfig.functions index 6909dcc..1707c5f 100755 --- a/autoconfig.functions +++ b/autoconfig.functions @@ -4,7 +4,7 @@ # Authors: grml-team (grml.org), (c) Klaus Knopper , (c) Michael Prokop # 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