rpms/kexec-tools/devel/kdump_build_helpers generate_module_list, NONE, 1.1

Neil Horman nhorman at fedoraproject.org
Thu May 14 20:09:31 UTC 2009


Author: nhorman

Update of /cvs/extras/rpms/kexec-tools/devel/kdump_build_helpers
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv2302/kdump_build_helpers

Added Files:
	generate_module_list 
Log Message:
Adding more helpers for mkdumprd2


--- NEW FILE generate_module_list ---
#!/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}'`
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/modules 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





More information about the scm-commits mailing list