Removing old files

This commit is contained in:
Neil Horman 2009-07-30 13:13:53 +00:00
parent 4049dbdcd9
commit b078c6dd71
7 changed files with 0 additions and 180 deletions

View File

@ -1,29 +0,0 @@
#!/bin/sh
BASE_DIR=$1
STAGE_DIR=$BASE_DIR/stage
#This build helper queries the currently loaded modules
#copies them to the initrd, and builds the /etc/module_load_list file
mkdir -p $STAGE_DIR/modules
for i in `/sbin/lsmod | awk '{print $1}' | tail --lines=+2`
do
for j in `/sbin/modprobe --show-depends $i | awk '/^insmod/ {print $2}'`
do
bname=$(basename $j)
cp $j $STAGE_DIR/modules
grep -q $bname $STAGE_DIR/etc/module_load_list 2>/dev/null
# Add the module to the list if its not already there
# or if the list doesn't yet exist
if [ $? -ne 0 ]
then
echo /modules/$bname >> $STAGE_DIR/etc/module_load_list
fi
done
done
exit 0

View File

@ -1,40 +0,0 @@
#!/bin/sh
. /etc/kdump-adv-conf/mkdumprd2_functions
STAGE_DIR=$1/stage
# We of course need busybox
install_with_deps /sbin/busybox 755
# And we need to link all the apps busybox provides in
for i in `/sbin/busybox |
awk 'BEGIN {found=0} /.*/ { if (found) print $0 } /Currently/ {found=1}' |
sed -e's/,//g' -e's/busybox//g'`
do
ln -s busybox $STAGE_DIR/sbin/$i
done
# We always get dash kpartx, dmsetup, lvm and mdadm
for i in /sbin/dash /sbin/lvm /sbin/kpartx /sbin/mdadm /sbin/dmsetup
do
install_with_deps $i 755
done
# We also want to suck in all the runtime scripts
# that make life easier inside the initramfs
# These don't need deps, because they're all msh scripts
for i in `ls /etc/kdump-adv-conf/kdump_build_helpers/`
do
if [ -f $i ]
then
install --mode=755 $i $STAGE_DIR/bin
fi
done
# make dash our default shell
rm -f $STAGE_DIR/bin/sh
$(cd $STAGE_DIR/bin; ln -s /bin/dash sh)
exit 0

View File

@ -1,24 +0,0 @@
#!/bin/sh
. /etc/kdump-adv-conf/mkdumprd2_functions
BASE_DIR=$1
STAGE_DIR=$BASE_DIR/stage
# This just grabs all the essential bits from udev into the initramfs
for i in `rpm -qli udev | grep ^/ | grep -v man | grep -v doc`
do
if [ ! -e $i ]
then
continue
fi
if [ -d $i ]
then
mkdir -p $STAGE_DIR/$i
else
MODE=`stat $i | grep "Access: (" | sed -e 's/\(Access: (\)\([0-7]\{4\}\)\(.*\)/\2/'`
install_with_deps $i $MODE
fi
done
exit 0

View File

@ -1,24 +0,0 @@
#!/bin/sh
#kdump-requires: /etc/lvm/lvm.conf
#
echo "Scanning logical volumes"
lvm vgscan --ignorelockingfailure --mknodes
echo "Activating logical volumes"
lvm vgchange -a y --ignorelockingfailure
DM_NUM=0
for i in `lvm lvs --noheadings -o lv_name,vg_name | sed -e's/\+/:/g'`
do
LV=`echo \$i | awk -F":" '{ print $2 }'`
VGRP=`echo $i | awk -F":" '{ print $3 }'`
mkdir -p /dev/$VGRP
if [ ! -e /dev/$VGRP/$LV ]
then
ln -s /dev/mapper/$VGRP-$LV /dev/$VGRP/$LV
DM_NUM=`echo $DM_NUM 1 + p | dc`
echo "Resuming /dev/mapper/"$VGRP-$LV
/sbin/dmsetup resume /dev/mapper/$VGRP-$LV
fi
done
echo "All LVM volumes reactivated"
exit 0

View File

@ -1,11 +0,0 @@
#!/bin/sh
#kdump-requires: /etc/module_load_list
echo "Loading modules"
while read module opts
do
echo "Loading module" $module
insmod $module $opts
done < /etc/module_load_list
echo "Done loading modules"

View File

@ -1,16 +0,0 @@
#!/bin/sh
if [ ! -x /bin/udevd ]
then
echo "udev isn't installed in this initramfs!"
exit 0
fi
# Sart the daemon
udevd --daemon
# Trigger coldplug events
udevadm trigger >/dev/null 2>&1
#Wait for events to complete
udevadm settle --timeout=30 >/dev/null 2>&1

View File

@ -1,36 +0,0 @@
#!/bin/sh
#kdump-requires: /etc/critical-disks
echo "Waiting for critical disks"
TIMEOUT_COUNT=""
if [ -n "$1" ]
then
TIMEOUT_COUNT=$1
fi
let COUNT=0
for i in `cat /etc/critical_disks`
do
echo -n "Waiting for" $i "..."
while [ ! -d $i ]
do
sleep 1
if [ -n "$TIMEOUT_COUNT" ]
then
if [ "$TIMEOUT_COUNT" == "$COUNT" ]
then
echo "Timeout waiting for disks, continuing..."
exit 1
fi
fi
let COUNT=$COUNT+1
done
echo "Found" $i
done
echo "Found all disks"
exit 0