[Livecd-commit] trunk/create_livecd.sh
svnusers at osadl.org
svnusers at osadl.org
Mon Sep 18 11:30:30 CEST 2006
Repository: /var/svn-osadl-projects/livecd/
Revision: 7
Author: tb10alj
Log message:
Integration of Luotao Fu's suggestions
Updated trunk/create_livecd.sh
Modified: trunk/create_livecd.sh
===================================================================
--- trunk/create_livecd.sh 2006-09-06 13:18:41 UTC (rev 6)
+++ trunk/create_livecd.sh 2006-09-18 09:30:30 UTC (rev 7)
@@ -193,7 +193,7 @@
exit_failed
fi
- if [ ! -f kernel_configs/config-knoppix ]
+ if [ ! -f kernel-configs/config-knoppix ]
then
echo "No kernel config found"
echo "Please create ./kernel_configs/config-knoppix"
@@ -215,18 +215,10 @@
exit 1
fi
-if [ -d $TARGET_DIR ]
+if [ ! -e $TARGET_DIR/copy_done ]
then
- chroot $TARGET_DIR/source/KNOPPIX ls
- if [ $? -eq 0 ]
- then
- DONT_COPY=1
- else
- echo "$TARGET_DIR is NOT empty and doesn't contain a remastering environment"
- exit 1
- fi
-else
DONT_COPY=0
+
if [ -z "$KNOPPIX_CDROM" ]
then
echo "No Source Directory given!!"
@@ -238,29 +230,28 @@
echo "$KNOPPIX_CDROM doesn't exist! ! !"
exit 1
fi
-fi
-if [ $DONT_COPY -eq 1 ]
-then
if [ ! -f $KNOPPIX_CDROM/KNOPPIX/KNOPPIX ]
then
echo "KNOPPIX CDROM is not mounted to $KNOPPIX_CDROM"
exit 1
fi
-fi
-# Insmod the cloop module if necessary
-if [ -z "$(lsmod | grep cloop)" ]
-then
- echo -n "Insmodding cloop..."
- modprobe cloop file=$KNOPPIX_CDROM/KNOPPIX/KNOPPIX
- handle_return_value "Error insmodding cloop"
+ # Insmod the cloop module if necessary
+ if [ -z "$(lsmod | grep cloop)" ]
+ then
+ echo -n "Insmodding cloop..."
+ modprobe cloop file=$KNOPPIX_CDROM/KNOPPIX/KNOPPIX
+ handle_return_value "Error insmodding cloop"
+ fi
+else
+ DONT_COPY=1
fi
-# Stupid write permission check ;-)
TEMP_DIR=$TARGET_DIR/temp
mkdir -p $TEMP_DIR
+# Stupid write permission check ;-)
touch $TARGET_DIR/gubbl_$$
handle_return_value "No write access to target directory"
@@ -271,7 +262,6 @@
if [ $DONT_COPY -eq 0 ]
then
-
# Mount the compressed KNOPPIX image
echo -n "*** Mounting compressed KNOPPIX image..."
if [ -b /dev/cloop ]
@@ -284,7 +274,7 @@
false
handle_return_value "No cloop device found"
fi
- mount $CLOOP $TARGET_DIR/temp
+ mount -o ro $CLOOP $TEMP_DIR
handle_return_value
mkdir -p $KNOPPIX_SOURCE
@@ -304,6 +294,7 @@
rsync -a --exclude "$KNOPPIX_CDROM/KNOPPIX/KNOPPIX" $KNOPPIX_CDROM/ $MASTER_DIR/
handle_return_value
fi
+ touch $TARGET_DIR/copy_done
fi
# Remove the OpenOffice package to save space
@@ -314,7 +305,6 @@
cd $COMEFROM
-
# Copy the custom tools
if [ "$CUSTOM_PROGRAM_DIRECTORY" -a -d $CUSTOM_PROGRAM_DIRECTORY ]
then
@@ -337,7 +327,7 @@
# Patch some startup files
# 1) /etc/X11/Xsession.d/45xsession
TMPFILE=$TARGET_DIR/tmpfile
- TARGETFILE=$TARGET_DIR/source/KNOPPIX/etc/X11/Xsession.d/45xsession
+ TARGETFILE=$KNOPPIX_SOURCE/etc/X11/Xsession.d/45xsession
LINENUMBER=`grep -n 'ln \$HOME/Desktop/KNOPPIX.desktop \$HOME/.kde/Autostart/showindex.desktop' $TARGETFILE | cut -d: -f1`
if [ -z "`grep latency-demo $TARGETFILE`" ]
@@ -377,7 +367,7 @@
fi
# 2) /etc/skel/.kde/share/config/kickerrc
- TARGETFILE=$TARGET_DIR/source/KNOPPIX/etc/skel/.kde/share/config/kickerrc
+ TARGETFILE=$KNOPPIX_SOURCE/etc/skel/.kde/share/config/kickerrc
if grep -q openoffice $TARGETFILE
then
# First figure out the largest applet number
@@ -417,7 +407,7 @@
make distclean
make-kpkg clean
# Copy the config file to the kernel source directory
- cp $COMEFROM/kernel_configs/config-knoppix $KERNEL_SOURCE/.config
+ cp $COMEFROM/kernel-configs/config-knoppix $KERNEL_SOURCE/.config
KERNELVERSION=`make kernelversion`
make-kpkg kernel-image kernel-headers
More information about the Livecd-commit
mailing list