Files
xen/tools/hotplug/Linux/update-modules.sh
T
Luis R. Rodriguez fafbc2926c xencommons: move module list into a generic place
This will allow us to share the same module list with
systemd, and lets us upkeep it in one place. Document this
while at it on the top level README and expand on the wiki:

http://wiki.xen.org/wiki/Category:Host_Configuration#Kernel_modules

In order to upkeep parallelism builds be explicit about the
requirement to complete all actions before any installation
targets.

Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
2014-08-04 14:58:23 +01:00

37 lines
629 B
Bash
Executable File

#!/usr/bin/env bash
set -e
IFS=''
XEN_ROOT=$1
XEN_OS=$2
XENCOMMONS_INITD=$3
cat $XEN_ROOT/config/${XEN_OS}.modules | (
while read l ; do
if echo $l | egrep -q "^#" ; then
continue
fi
if echo "$l" | egrep -q "\|" ; then
m1=${l%%|*}
m2=${l#*|}
echo " modprobe $m1 2>/dev/null || modprobe $m2 2>/dev/null"
else
echo " modprobe $l 2>/dev/null"
fi
done
) > ${XENCOMMONS_INITD}.modules
cat ${XENCOMMONS_INITD}.in | (
while read l ; do
if echo "$l" | egrep -q "@LOAD_MODULES@" ; then
cat ${XENCOMMONS_INITD}.modules
else
echo $l
fi
done
)
rm -f ${XENCOMMONS_INITD}.modules