kexec-tools/kdump_build_helpers/populate_kdump_std_files
2009-07-06 18:39:28 +00:00

41 lines
915 B
Bash
Executable File

#!/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