From: <ale...@us...> - 2004-03-02 14:13:56
|
Update of /cvsroot/morphix/morph-scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30496 Modified Files: install2mainmod Log Message: added safety check for $MODDIR, added deluser for morph user, extra output Index: install2mainmod =================================================================== RCS file: /cvsroot/morphix/morph-scripts/install2mainmod,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** install2mainmod 29 Feb 2004 23:32:01 -0000 1.1 --- install2mainmod 2 Mar 2004 13:54:16 -0000 1.2 *************** *** 35,38 **** --- 35,47 ---- MODDIR=`mktemp -d i2m.XXXXXX` + if [ -z "$MODDIR" ]; then + echo "MODDIR not set, aborting to avoid chaos..." + exit 1 + fi + + if [ "$MODDIR" -eq "" ]; then + echo "MODDIR is equal to empty string, aborting to avoid chaos..." + exit 1 + fi mkdir $MODDIR/MorphixCD *************** *** 47,50 **** --- 56,63 ---- mkdir $MODDIR/root mkdir $MODDIR/tmp + + # These are the bootscripts for the module + # Not much more than placeholders if there weren't any, + # if there were then just copy and use the old 'uns if [ -e /morphix ]; then cp -af /morphix $MODDIR/ *************** *** 60,66 **** --- 73,82 ---- echo "This mainmodule has been auto-generated by install2mainmod" >> $MODDIR/morphix/main_module fi + + # Copy the contents of the filesystem into the temporary directory cp -af /bin $MODDIR/ cp -af /etc $MODDIR/ cp -af /lib $MODDIR/ + # Remove the kernel modules: these come from the base module rm -rf $MODDIR/lib/modules/* cp -af /sbin $MODDIR/ *************** *** 69,72 **** --- 85,89 ---- # applying libGL patch + # this is messy, but necessary for libGL to work. It's placed back at boottime mkdir $MODDIR/usr/lib/backup mv $MODDIR/usr/lib/libGL.* $MODDIR/usr/lib/backup *************** *** 79,82 **** --- 96,103 ---- mv $MODDIR/usr/X11R6/lib/modules/extensions/libglx.a $MODDIR/usr/X11R6/lib/modules/extensions/backup/ + # If the morph user exists, we should remove it + # It's made at boottime from the contents of /etc/skel in the mainmod + chroot $MODDIR deluser --remove-all-files morph + echo "Done creating the uncompressed livecd in $MODDIR" echo "You now have the possibility to make manual changes" *************** *** 95,98 **** --- 116,120 ---- echo "Compressing complete" echo "Your module is available as $DESTMOD" + echo "Your uncompressed module is available as $MODDIR, you may safely remove it" echo "Have a nice day, and happy morphing!" echo \ No newline at end of file |