diff options
Diffstat (limited to 'scripts/local-top/lvm')
-rwxr-xr-x | scripts/local-top/lvm | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/scripts/local-top/lvm b/scripts/local-top/lvm deleted file mode 100755 index 4cf48ad..0000000 --- a/scripts/local-top/lvm +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/sh - -PREREQ="mdadm mdrun lvm2" - -prereqs() -{ - echo "$PREREQ" -} - -case $1 in -# get pre-requisites -prereqs) - prereqs - exit 0 - ;; -esac - -activate_vg() -{ - local vg="$1" - - # Make sure that we have a non-empty argument - if [ -z "${vg}" ]; then - return 1 - fi - - # Take care of lilo boot arg, risky activating of all vg - case $vg in - fe[0-9]*) - vgchange -ay - exit 0 - ;; - # FIXME: check major - /dev/root) - vgchange -ay - exit 0 - ;; - esac - - # Make sure that we have a d-m path - vg=${vg#/dev/mapper/} - if [ "$vg" = "$1" ]; then - return 1 - fi - - # Make sure that the device includes at least one dash - if [ "$(echo -n "$vg" | tr -d -)" = "$vg" ]; then - return 1 - fi - - # Split volume group from logical volume. - vg=$(echo ${vg} | sed -e 's#\(.*\)\([^-]\)-[^-].*#\1\2#') - # Reduce padded --'s to -'s - vg=$(echo ${vg} | sed -e 's#--#-#g') - - vgchange -ay ${vg} -} - -if [ -e /scripts/local-top/lvm2 ]; then - exit 0 -fi - -if [ ! -e /sbin/vgchange ]; then - exit 0 -fi - -modprobe dm-mod -modprobe dm-snapshot -modprobe dm-mirror - -activate_vg "$ROOT" -activate_vg "$resume" - -exit 0 |