#!/bin/sh PREREQ="md" prereqs() { echo "$PREREQ" } case $1 in # get pre-requisites prereqs) prereqs exit 0 ;; esac vg=${ROOT#/dev/mapper/} case ${vg} in /dev/root) unset vg ;; /*) exit 0 ;; esac modprobe -q dm-mod # 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}