Subversion Repositories livecd

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 beyerle@PS 1
#!/bin/bash
2
# Use module while running LiveCD
3
# include it into live directory structure on the fly
4
# Author: Tomas M. <http://www.linux-live.org>
5
#
6
 
7
if [ "$1" = "" ]; then
8
   echo
9
   echo "Use module on the fly while running Live CD"
10
   echo "Usage: $0 module.mo"
11
   exit
12
fi
13
 
14
if [ -a ./liblinuxlive ]; then
15
   . ./liblinuxlive
16
else
17
   . /usr/lib/liblinuxlive || exit 1
18
fi
19
 
20
union_insert_module / "$1" /livecd/live/memory/images 2>/dev/null
21
if [ $? -ne 0 ]; then
22
   MODULE=/livecd/live/memory/copy2ram/`basename $1`
23
   while [ -a "$MODULE" ]; do MODULE="$MODULE.x"; done
24
   echo "error occured. copying module to $MODULE and trying again"
25
   cp $1 $MODULE
26
   union_insert_module / "$MODULE" /livecd/live/memory/images 2>/dev/null
27
fi
28
 
29
# executable in /var/log/setup/setup.modulename will be started
30
# only by this script (uselivemod)
31
#
32
SETUPEXE="/var/log/setup/setup.`basename $1 .mo`"
33
if [ -x "$SETUPEXE" ]; then
34
   . $SETUPEXE;
35
fi