Fixing an ldd error leak, adding some runtime scripts and udev

This commit is contained in:
Neil Horman 2009-05-20 15:13:01 +00:00
parent e8af50beea
commit ae38cd5a0c
5 changed files with 80 additions and 9 deletions

View File

@ -0,0 +1,24 @@
#!/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

@ -0,0 +1,33 @@
#!/bin/msh
###################################################
# Start by setting up the console to work as a user
# expects
###################################################
exec >/dev/console 2>&1
export TERM=linux
export PS1='initramfs-test:\w\$ '
stty sane
##################################################
# Start udev up
##################################################
start_udev
##################################################
# Load all the modules based on
# /etc/module_load_list
##################################################
load_all_modules
##################################################
# Reboot the system to get back to production
##################################################
reboot -f

View File

@ -0,0 +1,14 @@
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

@ -11,7 +11,6 @@
# 1) reg
# reg <source file> <dest path>
# A regular file copy from the source to the dst directory
#
# 2) creg
# creg <source file> <dest path>
# like reg, but only copy if the source file exists
@ -47,6 +46,13 @@
####################################################
exec populate_kdump_std_files
####################################################
# Pull in udev so that we can easily setup block
# devices for lvm and all that
####################################################
exec populate_udev_files
####################################################
# This is a rudimentary module population script
# It looks at the currently loaded modules, copies them
@ -56,12 +62,6 @@ exec populate_kdump_std_files
###################################################
exec generate_module_list
###################################################
# If we have one, copy the critical disk list
# so we don't try to start lvm/mdraid to early
###################################################
creg /etc/kdump-adv-conf/critical_disks /etc
###################################################
# Lets get all our lvm and mdraid configs on board
###################################################
@ -77,4 +77,4 @@ gen awk /etc/fstab '/^[^#]/{print $1 " /mnt"$2 " "$3 " "$4 " "$5 " "$6}' /etc/fs
# Grab the standard initscript to capture to the local
# rootfs
###################################################
ren /usr/share/kexec-tools/kdumpinit.rootfs /init
#ren /usr/share/kexec-tools/kdumpinit.rootfs /init

View File

@ -13,7 +13,7 @@ load_dependent_libs()
local BIN=$1
local LIB=""
ldd $BIN | grep -q "not a dynamic executable"
ldd $BIN 2>/dev/null | grep -q "not a dynamic executable"
if [ $? == 0 ]
then
#There are no dependencies, we're done