Changeset 2569 in /cluster/svnroot


Ignore:
Timestamp:
Aug 21, 2010 12:36:54 AM (10 years ago)
Author:
skylar
Message:

fixing toram (#385)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bccd-ng/branches/skylar-devel/trees/KNOPPIX/boot/isolinux/minirt/linuxrc

    r2533 r2569  
    663663copy_to()
    664664{
     665 /bbin/busybox ash
    665666 # preparations
    666  /bin/mkdir $TARGET
     667 /bbin/mkdir $TARGET
    667668 COPY="$SOURCE/$KNOPPIX_DIR"
    668669 # look if we copy to hd or to ram
    669  SIZE="$(/usr/bin/du -s $COPY | /usr/bin/gawk '{print int($1*1.1)}')"
     670 SIZE="$(/bbin/du -s $COPY | /bbin/awk '{print int($1*1.1)}')"
    670671 test -n "$SIZE" || SIZE="800000"
    671672 case "$1" in
     
    673674   TARGET_DEV="/dev/shm"
    674675   TARGET_DEV_DESC="ramdisk"
    675    FOUNDSPACE="$(/usr/bin/gawk '/MemTotal/{print $2}' /proc/meminfo)"
     676   FOUNDSPACE="$(/bbin/awk '/MemTotal/{print $2}' /proc/meminfo)"
    676677   /bbin/mount -n -t tmpfs -o size=${SIZE}k $TARGET_DEV $TARGET
    677678  ;;
    678679  hd)
    679    TARGET_DEV=$(echo $CMDLINE | /usr/bin/tr ' ' '\n' | /bin/sed -n '/tohd=/s/.*=//p' | /usr/bin/tail -1)
     680   TARGET_DEV=$(echo $CMDLINE | /bbin/tr ' ' '\n' | /bin/sed -n '/tohd=/s/.*=//p' | /usr/bin/tail -1)
    680681   TARGET_DEV_DESC="$TARGET_DEV"
    681682
     
    701702   # check for enough free space
    702703   USED_SPACE=0
    703    test -r $TARGET/$KNOPPIX_DIR/$KNOPPIX_NAME && USED_SPACE=$(/usr/bin/du -s $TARGET/$KNOPPIX_DIR/$KNOPPIX_NAME | /usr/bin/gawk '{ print $1 }')
    704    FOUNDSPACE="$(/bin/df -k $TARGET | /usr/bin/tail -1 | /usr/bin/gawk '{ print $4+int('$USED_SPACE') }')"
     704   test -r $TARGET/$KNOPPIX_DIR/$KNOPPIX_NAME && USED_SPACE=$(/bbin/du -s $TARGET/$KNOPPIX_DIR/$KNOPPIX_NAME | /bbin/awk '{ print $1 }')
     705   FOUNDSPACE="$(/KNOPPIX/bin/df -k $TARGET | /KNOPPIX/usr/bin/tail -1 | /bbin/awk '{ print $4+int('$USED_SPACE') }')"
    705706  ;;
    706707  *)
     
    717718 # do the real copy
    718719 echo "${CRE}${GREEN}Copying KNOPPIX ${MEDIUM} to ${MAGENTA}$TARGET_DEV_DESC${GREEN}... Please be patient. ${NORMAL}"
    719  if [ -z "$COPY_COMMAND" -a -x /usr/bin/rsync ]; then
     720 if [ -z "$COPY_COMMAND" -a -x /KNOPPIX/usr/bin/rsync ]; then
    720721  # first cp the small files
    721   /usr/bin/rsync -a --exclude="$KNOPPIX_DIR/$KNOPPIX_NAME*" $COPY $TARGET # Copy Knoppix to $TARGET
     722  /KNOPPIX/usr/bin/rsync -a --exclude="$KNOPPIX_DIR/$KNOPPIX_NAME*" $COPY $TARGET # Copy Knoppix to $TARGET
    722723  # then the big files with nice progress meter
    723   /usr/bin/rsync -a --progress --include="$KNOPPIX_DIR/$KNOPPIX_NAME*" --include="$KNOPPIX_DIR/" --exclude="*" $COPY $TARGET
     724  /KNOPPIX/usr/bin/rsync -a --progress --include="$KNOPPIX_DIR/$KNOPPIX_NAME*" --include="$KNOPPIX_DIR/" --exclude="*" $COPY $TARGET
    724725 else
    725726  "$COPY_COMMAND" $COPY $TARGET
Note: See TracChangeset for help on using the changeset viewer.