From: Brendan M. S. <me...@ba...> - 2005-03-08 00:05:58
|
Hi All, I like the idea of a $DERIVATIVE. {Delete whole email I had written, after re-reading source} The DERIVATIVE does not appear to be causing the problem with PMI that a user has seen. 1) Beasue it not used yet in 0.5 2) Bacause you can set fromdirectory="" Anyway now I emailing about linuxrc. Could I make $DERIVATIVE into a bootoption ? Also I like to change the 800M of /bin/mount -t tmpfs -o size=800M /dev/shm /cdrom2 To something like :- du /cdrom -s -b >/tmp/$NAME_OF_TMP SIZE=$(awk '{print $1}' /tmp/$NAME_OF_TMP) SIZE_EXTRA_10="$(expr $SIZE / 10)" SIZE_TOTAL="$(expr $SIZE + $SIZE_EXTRA_10)" /bin/mount -t tmpfs -o size=$SIZE_TOTAL /dev/shm /cdrom2 Although I am not sure du will work in the miniroot. (Only one way to find out) Regards, Brendan. ---------- Forwarded message ---------- From: Alex de Landgraaf <ale...@us...> Date: Fri, 04 Feb 2005 01:35:55 +0000 Subject: [Morphix-cvs] scripts-base/miniroot/linuxrc-scripts linuxrc,1.18,1.19 To: mor...@li... Update of /cvsroot/morphix/scripts-base/miniroot/linuxrc-scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24744 Modified Files: linuxrc Log Message: * all your copyto-ed $DERIVATIVE are belong to us Index: linuxrc =================================================================== RCS file: /cvsroot/morphix/scripts-base/miniroot/linuxrc-scripts/linuxrc,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** linuxrc 21 Jan 2005 13:40:31 -0000 1.18 --- linuxrc 4 Feb 2005 01:35:42 -0000 1.19 *************** *** 324,327 **** --- 324,338 ---- break fi + ## Detect default "copyto"'ed bases, too (see copyto section below) + if test -d /$MOUNT_IMAGE/$DERIVATE/base + then + HD_DIRECTORY=$DERIVATE + echo -n "${CRE}${GREEN}Accessing ${DERIVATE} image at ${MAGENTA}$i on /$HD_DIRECTORY${GREEN}...${NORMAL}" + FOUND_MORPHIX="$i" + umount /$MOUNT_IMAGE + MOUNT_IMAGE="localrw" + mountit $i /$MOUNT_IMAGE >/dev/null + break + fi umount /$MOUNT_IMAGE fi *************** *** 360,364 **** # Squashfs usage is disabled, as we need our squash-detecting trick to work... ! if `head -n1 /cdrom/base/morphix | grep -q "hsqs"`;then USE_SQUASH=yes fi --- 371,375 ---- # Squashfs usage is disabled, as we need our squash-detecting trick to work... ! if `head -n1 /cdrom/$HD_DIRECTORY/base/morphix | grep -q "hsqs"`;then USE_SQUASH=yes fi *************** *** 375,378 **** --- 386,390 ---- # COPYTORAM copied (ironic, isn't it?) from Fabian's linuxrc.rampatch 2003-07-26 + # COPYTOHD goes into a single folder /$DERIVATE/ off the root of the hard drive COPYTOHD="" COPYTO="" *************** *** 393,401 **** echo "Copying /cdrom to RamDisk/Harddisk, please be patient..." # Hey, we could use some fancy dialog skript here :-)) ! /bin/mkdir /cdrom2 if [ -n "$COPYTORAM" ] then /bin/mount -t tmpfs -o size=800M /dev/shm /cdrom2 ! /bin/cp -a /cdrom/* /cdrom2 # Copy everything to /cdrom2; yes we need more things then only the KNOPPIX/Morphix image, we don't want to produce problems we hadn't before, do we ? (note from Alex: this also copies any modules on the cdrom. Gotta love this patch :) else COPYTOHD=$(echo $CMDLINE | /usr/bin/tr ' ' '\n' | /bin/sed -n '/tohd=/s/.*=//p' | /usr/bin/tail -1) --- 405,413 ---- echo "Copying /cdrom to RamDisk/Harddisk, please be patient..." # Hey, we could use some fancy dialog skript here :-)) ! /bin/mkdir -p /cdrom2/$DERIVATE if [ -n "$COPYTORAM" ] then /bin/mount -t tmpfs -o size=800M /dev/shm /cdrom2 ! /bin/cp -a /cdrom/* /cdrom2/$DERIVATE # Copy everything to /cdrom2; yes we need more things then only the KNOPPIX/Morphix image, we don't want to produce problems we hadn't before, do we ? (note from Alex: this also copies any modules on the cdrom. Gotta love this patch :) else COPYTOHD=$(echo $CMDLINE | /usr/bin/tr ' ' '\n' | /bin/sed -n '/tohd=/s/.*=//p' | /usr/bin/tail -1) *************** *** 403,407 **** if mountit /dev/$COPYTOHD /cdrom2 >/dev/null then ! /bin/cp -a /cdrom/* /cdrom2 #/bin/mount -o remount,ro /dev/$COPYTOHD /cdrom2 else --- 415,420 ---- if mountit /dev/$COPYTOHD /cdrom2 >/dev/null then ! /bin/mkdir /cdrom2/$DERIVATE ! /bin/cp -a /cdrom/* /cdrom2/$DERIVATE #/bin/mount -o remount,ro /dev/$COPYTOHD /cdrom2 else *************** *** 414,424 **** echo "0" > /proc/sys/kernel/printk # Debugging umount /cdrom # unmount CD ! if test -f /cdrom2/base/morphix; then if [ -z "$USE_SQUASH" ];then $INSMOD -f /modules/cloop$KEXT 2> /dev/null ! $LOSETUP /dev/cloop /cdrom2/base/morphix mountit /dev/cloop /MorphixCD "-o ro" || FOUND_MORPHIX="" 2> /dev/null else ! mount -t squashfs -o "loop,ro" /cdrom2/base/morphix /MorphixCD || FOUND_MORPHIX="" 2> /dev/null fi else --- 427,437 ---- echo "0" > /proc/sys/kernel/printk # Debugging umount /cdrom # unmount CD ! if test -f /cdrom2/$DERIVATE/base/morphix; then if [ -z "$USE_SQUASH" ];then $INSMOD -f /modules/cloop$KEXT 2> /dev/null ! $LOSETUP /dev/cloop /cdrom2/$DERIVATE/base/morphix mountit /dev/cloop /MorphixCD "-o ro" || FOUND_MORPHIX="" 2> /dev/null else ! mount -t squashfs -o "loop,ro" /cdrom2/$DERIVATE/base/morphix /MorphixCD || FOUND_MORPHIX="" 2> /dev/null fi else ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Morphix-cvs mailing list Mor...@li... https://lists.sourceforge.net/lists/listinfo/morphix-cvs |