summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/functions40
-rw-r--r--scripts/local-top/evms31
-rw-r--r--scripts/local-top/lvm4
3 files changed, 68 insertions, 7 deletions
diff --git a/scripts/functions b/scripts/functions
index 4b3b7cf..148dda7 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -144,10 +144,11 @@ run_scripts()
}
ide_boot_events() {
- [ -e /proc/ide ] || return
modprobe -q ide-generic
+ [ -e /proc/ide ] || return
+
for drive in /proc/ide/*; do
[ -e ${drive}/media ] || continue
# nothing to do if the device has already been took in charge
@@ -156,11 +157,11 @@ ide_boot_events() {
read media < $drive/media
case "$media" in
- disk) MODULE=ide-disk ;;
- cdrom) MODULE=ide-cd ;;
- tape) MODULE=ide-tape ;;
- floppy) MODULE=ide-floppy ;;
- *) MODULE=ide-generic ;;
+ disk) MODULE=ide-disk ;;
+ cdrom) MODULE=ide-cd ;;
+ tape) MODULE=ide-tape ;;
+ floppy) MODULE=ide-floppy ;;
+ *) MODULE=ide-generic ;;
esac
modprobe -q ${MODULE}
@@ -172,6 +173,7 @@ scsi_boot_events()
[ -e /sys/bus/scsi/devices/ ] || return
for device in /sys/bus/scsi/devices/*; do
+ [ -e "${device}"/type ] || continue
read media < ${device}/type
case "$media" in
0) modprobe -q sd_mod;
@@ -209,6 +211,32 @@ load_modules()
fi
for x in /sys/bus/pci/devices/*; do
+ if [ -e ${x}/class ]; then
+ case $(cat ${x}/class) in
+ 0x0100*|0x0101*)
+ if [ -e ${x}/modalias ]; then
+ modprobe -q $(cat ${x}/modalias)
+ fi
+ ;;
+ esac
+ fi
+ done
+
+ ide_boot_events
+
+ scsi_boot_events
+
+ i2o_boot_events
+
+ if [ -e /sys/power/resume ]; then
+ if [ -e ${resume} ]; then
+ major=$((0x$(stat -c%t ${resume})))
+ minor=$((0x$(stat -c%T ${resume})))
+ echo ${major}:${minor} >/sys/power/resume
+ fi
+ fi
+
+ for x in /sys/bus/pci/devices/*; do
if [ -e ${x}/modalias ]; then
modprobe -q $(cat ${x}/modalias)
fi
diff --git a/scripts/local-top/evms b/scripts/local-top/evms
new file mode 100644
index 0000000..2ee7e80
--- /dev/null
+++ b/scripts/local-top/evms
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+PREREQ="lvm"
+
+prereqs()
+{
+ echo "$PREREQ"
+}
+
+case $1 in
+# get pre-requisites
+prereqs)
+ prereqs
+ exit 0
+ ;;
+esac
+
+evms=${ROOT#/dev/evms/}
+
+case ${evms} in
+ /dev/root)
+ unset evms
+ ;;
+ /*)
+ exit 0
+ ;;
+esac
+
+modprobe -q dm-mod
+
+/sbin/evms_activate
diff --git a/scripts/local-top/lvm b/scripts/local-top/lvm
index 9307f55..7ac81e6 100644
--- a/scripts/local-top/lvm
+++ b/scripts/local-top/lvm
@@ -28,8 +28,10 @@ esac
modprobe -q dm-mod
-# Cope with -'s in the volume group and node names.
+# 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}