rpms/kexec-tools/devel mkdumprd2_functions, NONE, 1.1 mkdumprd2, 1.3, 1.4
Neil Horman
nhorman at fedoraproject.org
Mon May 18 01:17:12 UTC 2009
- Previous message: rpms/kexec-tools/devel/kdump_build_helpers populate_kdump_std_files, NONE, 1.1 generate_module_list, 1.2, 1.3
- Next message: rpms/autofs/devel autofs-5.0.4-always-read-file-maps-key-lookup-fixes.patch, NONE, 1.1 autofs-5.0.4-always-read-file-maps-multi-map-fix.patch, NONE, 1.1 autofs-5.0.4-dont-fail-on-ipv6-address-adding-host.patch, NONE, 1.1 autofs-5.0.4-dont-umount-existing-direct-mount-on-reread.patch, NONE, 1.1 autofs-5.0.4-fix-kernel-includes.patch, NONE, 1.1 autofs-5.0.4-improve-manual-umount-recovery.patch, NONE, 1.1 autofs-5.0.4-library-reload-fix-update-fix.patch, NONE, 1.1 autofs-5.0.4-use-intr-as-hosts-mount-default.patch, NONE, 1.1 autofs-5.0.4-use-srv-query-for-domain-dn.patch, NONE, 1.1 autofs.spec, 1.279, 1.280
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: nhorman
Update of /cvs/extras/rpms/kexec-tools/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv26388
Modified Files:
mkdumprd2
Added Files:
mkdumprd2_functions
Log Message:
Adding functionality to mkdumprd2
--- NEW FILE mkdumprd2_functions ---
#!/bin/sh
##########################################################
#File: mkdumprd2
#Author: Neil Horman <nhorman at redhat.com>
#Copyright 2009 Red Hat, Inc.
#Summary: A vastly simplified infrastructure for creating
# initramfs files for use with kdump
#########################################################
load_dependent_libs()
{
local BIN=$1
local LIB=""
ldd $BIN | grep -q "not a dynamic executable"
if [ $? == 0 ]
then
#There are no dependencies, we're done
return
fi
ldd $BIN | grep -q "statically linked"
if [ $? == 0 ]
then
#There are no dependencies, we're done
return
fi
for LIB in `ldd $BIN | awk '/\// {if ($2 == "=>") { print $3} else {print $1}}'`
do
load_dependent_libs $LIB
if [ ! -e $STAGE_DIR/$LIB ]
then
install --mode=755 $LIB $STAGE_DIR/$LIB
fi
done
return
}
install_with_deps()
{
local BIN=$1
local MODE=$2
install --mode=$MODE $BIN $STAGE_DIR/bin
load_dependent_libs $BIN
}
Index: mkdumprd2
===================================================================
RCS file: /cvs/extras/rpms/kexec-tools/devel/mkdumprd2,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- mkdumprd2 15 May 2009 20:23:55 -0000 1.3
+++ mkdumprd2 18 May 2009 01:16:40 -0000 1.4
@@ -8,7 +8,7 @@
# initramfs files for use with kdump
#########################################################
-
+. /etc/kdump-adv-conf/mkdumprd2_functions
########################################################
#Global Variables
@@ -72,7 +72,7 @@ cleanup_and_exit()
#########################################################
setup_env()
{
- PATH=$PATH:/etc/kdump-adv-conf/kdump_build_helpers
+ PATH=/etc/kdump-adv-conf/kdump_build_helpers:$PATH
}
@@ -141,74 +141,6 @@ create_initramfs_dirs()
$(cd $STAGE_DIR; ln -s bin sbin)
}
-load_dependent_libs()
-{
- local BIN=$1
- ldd $BIN | grep -q "not a dynamic executable"
- if [ $? == 0 ]
- then
- #There are no dependencies, we're done
- return
- fi
-
- ldd $BIN | grep -q "statically linked"
- if [ $? == 0 ]
- then
- #There are no dependencies, we're done
- return
- fi
-
- for LIB in `ldd $BIN | awk '/\// {if ($2 == "=>") { print $3} else {print $1}}'`
- do
- load_dependent_libs $LIB
- if [ ! -f $STAGE_DIR/$LIB ]
- then
- install --mode=755 $LIB $STAGE_DIR/$LIB
- fi
- done
- return
-}
-
-install_with_deps()
-{
- local BIN=$1
- local MODE=$2
-
- install --mode=$MODE $BIN $STAGE_DIR/bin
- load_dependent_libs $BIN
-}
-
-populate_std_files()
-{
- # 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 kpartx, dmsetup, lvm and mdadm
- for i in /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
-
-}
#########################################################
#This function is the recepie for populating our initramfs
@@ -220,9 +152,6 @@ prep_std_initramfs()
{
#start by creating the directories we need
create_initramfs_dirs
-
- #copy in the standard included files
- populate_std_files
}
- Previous message: rpms/kexec-tools/devel/kdump_build_helpers populate_kdump_std_files, NONE, 1.1 generate_module_list, 1.2, 1.3
- Next message: rpms/autofs/devel autofs-5.0.4-always-read-file-maps-key-lookup-fixes.patch, NONE, 1.1 autofs-5.0.4-always-read-file-maps-multi-map-fix.patch, NONE, 1.1 autofs-5.0.4-dont-fail-on-ipv6-address-adding-host.patch, NONE, 1.1 autofs-5.0.4-dont-umount-existing-direct-mount-on-reread.patch, NONE, 1.1 autofs-5.0.4-fix-kernel-includes.patch, NONE, 1.1 autofs-5.0.4-improve-manual-umount-recovery.patch, NONE, 1.1 autofs-5.0.4-library-reload-fix-update-fix.patch, NONE, 1.1 autofs-5.0.4-use-intr-as-hosts-mount-default.patch, NONE, 1.1 autofs-5.0.4-use-srv-query-for-domain-dn.patch, NONE, 1.1 autofs.spec, 1.279, 1.280
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list