Blame | Last modification | View Log | Download | RSS feed
#!/bin/bash
# Use module while running LiveCD
# include it into live directory structure on the fly
# Author: Tomas M. <http://www.linux-live.org>
#
if [ "$1" = "" ]; then
echo
echo "Use module on the fly while running Live CD"
echo "Usage: $0 module.mo"
exit
fi
if [ -a ./liblinuxlive ]; then
. ./liblinuxlive
else
. /usr/lib/liblinuxlive || exit 1
fi
union_insert_module / "$1" /livecd/live/memory/images 2>/dev/null
if [ $? -ne 0 ]; then
MODULE=/livecd/live/memory/copy2ram/`basename $1`
while [ -a "$MODULE" ]; do MODULE="$MODULE.x"; done
echo "error occured. copying module to $MODULE and trying again"
cp $1 $MODULE
union_insert_module / "$MODULE" /livecd/live/memory/images 2>/dev/null
fi
# executable in /var/log/setup/setup.modulename will be started
# only by this script (uselivemod)
#
SETUPEXE="/var/log/setup/setup.`basename $1 .mo`"
if [ -x "$SETUPEXE" ]; then
. $SETUPEXE;
fi