/[clonezilla-sysresccd]/trunk/create-clonezilla-sysresccd/create-clonezilla-sysresccd.sh
ViewVC logotype

Diff of /trunk/create-clonezilla-sysresccd/create-clonezilla-sysresccd.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 63 by sng, Wed May 26 20:30:21 2010 UTC revision 93 by sng, Fri Aug 13 08:30:37 2010 UTC
# Line 313  function readConfig(){ Line 313  function readConfig(){
313  }  }
314    
315  ####### Script starts here #######  ####### Script starts here #######
316    MKISOFS=genisoimage
317  onlyBurnISO=0  onlyBurnISO=0
318  onlyCopyFiles=0  onlyCopyFiles=0
319  onlyCreateISO=0  onlyCreateISO=0
# Line 416  if [ -n "$auto" ];then Line 417  if [ -n "$auto" ];then
417      echo '  Error: Parameter -a used without -p'      echo '  Error: Parameter -a used without -p'
418                  exit 1                  exit 1
419          fi          fi
420    if [ -n "$onlyBurnISO" ];then    if [ "$onlyBurnISO" -eq 1 ];then
421      echo "  Error: Conflicting parameters -a and -b used"      echo "  Error: Conflicting parameters -a and -b used"
422                  exit 1                  exit 1
423          fi          fi
# Line 570  Is this correct? (y/[n]): " Line 571  Is this correct? (y/[n]): "
571    fi    fi
572    echo -n "Copying new cfg file(s)...   "    echo -n "Copying new cfg file(s)...   "
573    if [ -z $(echo "$cfgFile" | grep 'cfg$') ];then    if [ -z $(echo "$cfgFile" | grep 'cfg$') ];then
574      tar -C /root/tmp/clonezilla-sysresccd -xzhf /root/.clonezilla-sysresccd/files/menu-iso.tar.gz      tar -C /root/tmp/clonezilla-sysresccd -xzhf /root/.clonezilla-sysresccd/files/menu-for-iso.tar.gz
575    else    else
576      cp -L "$cfgFile" /root/tmp/clonezilla-sysresccd/isolinux/isolinux.cfg      cp -L "$cfgFile" /root/tmp/clonezilla-sysresccd/isolinux/isolinux.cfg
577    fi    fi
# Line 580  Is this correct? (y/[n]): " Line 581  Is this correct? (y/[n]): "
581    WHERE="$(pwd)"    WHERE="$(pwd)"
582    mkdir /root/tmp/clonezilla-sysresccd/restorecd 2>/dev/null    mkdir /root/tmp/clonezilla-sysresccd/restorecd 2>/dev/null
583    cd /root/.clonezilla-sysresccd/files    cd /root/.clonezilla-sysresccd/files
584    cp -L pre* ocs-iso what-cd continue-multi-cd isolinux-restore-cd.cfg \    cp -L pre* ocs-iso what-cd patch-clonezilla-sysresccd continue-multi-cd isolinux-restore-cd.cfg \
585      isolinux-restore-cd-ram.cfg menu-iso.tar.gz doc.tar.gz imginfo imgconvert cust-menu /root/tmp/clonezilla-sysresccd/restorecd      isolinux-restore-cd-ram.cfg menu-for-iso.tar.gz doc.tar.gz imginfo imgconvert cust-menu /root/tmp/clonezilla-sysresccd/restorecd
586    cp -L default-restore-ocswp.png /root/tmp/clonezilla-sysresccd/restorecd/ocswp.png    cp -L default-restore-ocswp.png /root/tmp/clonezilla-sysresccd/restorecd/ocswp.png
587    cp sbminst /root/tmp/clonezilla-sysresccd/restorecd    cp sbminst /root/tmp/clonezilla-sysresccd/restorecd
588        
# Line 657  Is this correct? (y/[n]): " Line 658  Is this correct? (y/[n]): "
658   mv /root/tmp/clonezilla-sysresccd/rawrite /root/tmp/clonezilla-sysresccd/bootprog /root/tmp/clonezilla-sysresccd/utils   mv /root/tmp/clonezilla-sysresccd/rawrite /root/tmp/clonezilla-sysresccd/bootprog /root/tmp/clonezilla-sysresccd/utils
659   mv /root/tmp/clonezilla-sysresccd/version /root/tmp/clonezilla-sysresccd/SystemRescueCD-Version   mv /root/tmp/clonezilla-sysresccd/version /root/tmp/clonezilla-sysresccd/SystemRescueCD-Version
660    
661    #
662    # re-build clonezilla filesystem.squashfs
663    #
664    echo -n "Rebuilding Clonezilla squashfs...   "
665    cd /root/tmp/clonezilla-sysresccd/live
666    unsquashfs filesystem.squashfs 2>/dev/null 1>&2
667    cp -r ../README* ../doc ../restorecd squashfs-root
668    mksquashfs squashfs-root aa.squashfs -always-use-fragments -no-duplicates -all-root 2>/dev/null 1>&2
669    mv aa.squashfs filesystem.squashfs
670    rm -rf squashfs-root
671    cd
672    echo 'done'
673    
674   if [ $onlyCopyFiles -eq 1 ];then   if [ $onlyCopyFiles -eq 1 ];then
675    cleanUpValue=1    cleanUpValue=1
676  #   echo  #   echo
# Line 682  else Line 696  else
696    echo "Creating new ISO file."    echo "Creating new ISO file."
697  fi  fi
698    find /root/tmp/clonezilla-sysresccd -name "*~" -exec rm '{}' ';'    find /root/tmp/clonezilla-sysresccd -name "*~" -exec rm '{}' ';'
699  #   mkisofs -quiet -f -r -J -o "$outFile" -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -iso-level 3 -joliet-long -input-charset utf-8 -output-charset utf-8 -V "$volLabel" -publisher "$publisher" -p "$preparerID" /root/tmp/clonezilla-sysresccd || errorISO  #    $MKISOFS -quiet -f -r -J -o "$outFile" -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -iso-level 3 -joliet-long -input-charset utf-8 -output-charset utf-8 -V "$volLabel" -publisher "$publisher" -p "$preparerID" /root/tmp/clonezilla-sysresccd || errorISO
700    mkisofs -quiet -f -r -J -o "$outFile" -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -V "$volLabel" -publisher "$publisher" -p "$preparerID" /root/tmp/clonezilla-sysresccd || errorISO     $MKISOFS -quiet -f -r -J -o "$outFile" -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -V "$volLabel" -publisher "$publisher" -p "$preparerID" /root/tmp/clonezilla-sysresccd || errorISO
701    echo "    echo "
702  Done creating new ISO file  Done creating new ISO file
703  The file is saved as $outFile"  The file is saved as $outFile"

Legend:
Removed from v.63  
changed lines
  Added in v.93

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26