/[clonezilla-sysresccd]/trunk/create-clonezilla-sysresccd/files/ocs-iso
ViewVC logotype

Diff of /trunk/create-clonezilla-sysresccd/files/ocs-iso

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

revision 47 by sng, Thu May 20 12:12:53 2010 UTC revision 93 by sng, Fri Aug 13 08:30:37 2010 UTC
# Line 23  iso9660_file_size_limit="2000M"   # For Line 23  iso9660_file_size_limit="2000M"   # For
23  # We will create it like this:  # We will create it like this:
24  # -x $DEBIAN_ISO_TMP/isolinux -x $DEBIAN_ISO_TMP/md5sum.txt -x $DEBIAN_ISO_TMP/casper/memtest  # -x $DEBIAN_ISO_TMP/isolinux -x $DEBIAN_ISO_TMP/md5sum.txt -x $DEBIAN_ISO_TMP/casper/memtest
25  # "home" should also be excluded since if it exists, it will conflict with the real home later we will merge. Ref: https://sourceforge.net/forum/message.php?msg_id=7599463  Thanks to Andrew Bloxom for this idea.  # "home" should also be excluded since if it exists, it will conflict with the real home later we will merge. Ref: https://sourceforge.net/forum/message.php?msg_id=7599463  Thanks to Andrew Bloxom for this idea.
26  mkiso_exclude_list_1="isolinux md5sum.txt doc live etc pkg ocs-live.d utils"  mkiso_exclude_list_1="isolinux syslinux md5sum.txt doc live etc pkg ocs-live.d utils"
27  mkiso_exclude_list_2="home"  # This should not be a duplicated count.  mkiso_exclude_list_2="home"  # This should not be a duplicated count.
28  mkiso_exclude_list="$mkiso_exclude_list_1 $mkiso_exclude_list_2"  mkiso_exclude_list="$mkiso_exclude_list_1 $mkiso_exclude_list_2"
29    
# Line 77  USAGE() { Line 77  USAGE() {
77  check_file_size_in_ocs_image() {  check_file_size_in_ocs_image() {
78    local img_path="$1"    local img_path="$1"
79    local size_t    local size_t
80    for ifile in $img_path $img_path/*; do    for ifile in $img_path/*; do
81      size_t="$(du -Lms $ifile | awk -F" " '{print $1}')"      size_t="$(du -Lms $ifile | awk -F" " '{print $1}')"
82      if [ "$size_t" -gt "$FILE_LIMIT" ]; then      if [ "$size_t" -gt "$FILE_LIMIT" ]; then
83  ################################################################################  ################################################################################
84  # Section edited by S. Georgaras <sng@hellug.gr>  # Section edited by S. Georgaras <sng@hellug.gr>
85            
86  #       [ "$BOOTUP" = "color" ] && $SETCOLOR_FAILURE  #      [ "$BOOTUP" = "color" ] && $SETCOLOR_WARNING
87  #       echo "$ifile size ($size_t MB) is too large! $msg_mkisofs_unable_process_that"  #      echo "$ifile size ($size_t MB) is too large! $msg_mkisofs_unable_process_that"
88  #       echo "$msg_unable_to_create_clonezilla_img_iso"  #      [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL
89  #       [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL  #      echo "$msg_are_u_sure_u_want_to_continue"
90  #       exit 1  #      echo -n "[y/N] "
91    #      read cont_ans
92    #      case "$cont_ans" in
93    #        y|Y|[yY][eE][sS])
94    #           echo $msg_ok_let_do_it
95    #           ;;
96    #        *)
97    #           echo "Abort!"
98    #           exit 2
99    #      esac
100          whiptail --backtitle Clonezilla-SysRescCD --title ' Excessive Image Size ' --yesno "The image file \"$(basename ${ifile%/})\" is too large ($size_t MB) and cannot be processed!!!          whiptail --backtitle Clonezilla-SysRescCD --title ' Excessive Image Size ' --yesno "The image file \"$(basename ${ifile%/})\" is too large ($size_t MB) and cannot be processed!!!
101    
102  Do you want to create a 8GB DVD instead?" 0 60  Do you want to create a 8GB DVD instead?" 0 60
# Line 103  Do you want to create a 8GB DVD instead? Line 112  Do you want to create a 8GB DVD instead?
112    
113  #  #
114  clean_tmp_dir() {  clean_tmp_dir() {
115    [ -d "$ISOLNX_TMP" -a -n "$ISOLNX_TMP" ] && rm -rf $ISOLNX_TMP    [ -d "$ISOSYSLNX_TMP" -a -n "$(echo $ISOSYSLNX_TMP | grep "ocs_isosyslnx")" ] && rm -rf $ISOSYSLNX_TMP
116    [ -d "$WD_TMP" -a -n "$WD_TMP" ] && rm -rf $WD_TMP    [ -d "$WD_TMP" -a -n "$(echo $WD_TMP | grep "ocs_iso_wd")" ] && rm -rf $WD_TMP
117    [ -d "$DEBIAN_ISO_TMP" ] && umount $DEBIAN_ISO_TMP &>/dev/null && rm -rf $DEBIAN_ISO_TMP    [ -d "$DEBIAN_ISO_TMP" ] && umount $DEBIAN_ISO_TMP &>/dev/null && rmdir $DEBIAN_ISO_TMP
118  } # End of clean_tmp_dir  } # End of clean_tmp_dir
119    
120  #  #
# Line 201  while [ $# -gt 0 ]; do Line 210  while [ $# -gt 0 ]; do
210              ;;              ;;
211      -s|--skip-image)      -s|--skip-image)
212              insert_mode="prog_only"              insert_mode="prog_only"
213                #
214                # Section inserted by S. Georgaras <sng@hellug.gr>
215                # Variable to know that -s was actually used
216                #
217                ORIGINAL_INSERT_MODE='-o'
218                #
219                ##################################################
220              shift ;;              shift ;;
221      -t|--ocs-live-batch)      -t|--ocs-live-batch)
222              ocs_live_batch="yes"              ocs_live_batch="yes"
# Line 329  get_live_media_mnt_point &>/dev/null Line 345  get_live_media_mnt_point &>/dev/null
345  # Some temp dirs  # Some temp dirs
346  # Thanks to Orgad Shaneh. Since the temp files from Clonezilla live won't take too much space, we just use /tmp/ to store these temp files.  # Thanks to Orgad Shaneh. Since the temp files from Clonezilla live won't take too much space, we just use /tmp/ to store these temp files.
347  #if [ -w ./ ]; then  #if [ -w ./ ]; then
348  #  ISOLNX_TMP="$(mktemp -d ./isolnx.XXXXXX)"  #  ISOSYSLNX_TMP="$(mktemp -d ./isolnx.XXXXXX)"
349  #  WD_TMP="$(mktemp -d ./iso_wd.XXXXXX)"  #  WD_TMP="$(mktemp -d ./iso_wd.XXXXXX)"
350  #else  #else
351  #  ISOLNX_TMP="$(mktemp -d /tmp/isolnx.XXXXXX)"  #  ISOSYSLNX_TMP="$(mktemp -d /tmp/isolnx.XXXXXX)"
352  #  WD_TMP="$(mktemp -d /tmp/iso_wd.XXXXXX)"  #  WD_TMP="$(mktemp -d /tmp/iso_wd.XXXXXX)"
353  #fi  #fi
354  ISOLNX_TMP="$(mktemp -d /tmp/isolnx.XXXXXX)"  ISOSYSLNX_TMP="$(mktemp -d /tmp/ocs_isosyslnx.XXXXXX)"
355  WD_TMP="$(mktemp -d /tmp/iso_wd.XXXXXX)"  WD_TMP="$(mktemp -d /tmp/ocs_iso_wd.XXXXXX)"
356    
357  #  #
358  trap clean_tmp_dir HUP INT QUIT TERM EXIT  trap clean_tmp_dir HUP INT QUIT TERM EXIT
# Line 454  else Line 470  else
470  fi  fi
471    
472  #  #
 if [ "$template_mode" = "from-booting-live-media" ]; then  
   # From boot media, DEBIAN_ISO_TMP is LIVE_MEDIA  
   # Here we use -Lks to make it more accurate.  
   template_iso_size="$(LC_ALL=C du -Lks $LIVE_MEDIA | awk -F" " '{print $1}')"  
   # Exclude those dirs  
   exclude_dir_size="0"  
   for i in $mkiso_exclude_list_2; do  
     [ ! -d "$LIVE_MEDIA/$i" ] && continue  
     exclude_dir_size="$(($exclude_dir_size + $(LC_ALL=C du -Lks "$LIVE_MEDIA/$i" | awk -F" " '{print $1}')))"  
   done  
   template_iso_size="$(LC_ALL=C echo "scale=0; ($template_iso_size - $exclude_dir_size)/1024" | bc -l)"  # converted as MB.  
 else  
   # From iso file  
   # Here we use -Lks to make it more accurate.  
   template_iso_size="$(LC_ALL=C du -Lks $DEBIAN_ISO | awk -F" " '{print $1}')"  
   # Exclude those dirs  
   exclude_dir_size="0"  
   for i in $mkiso_exclude_list_2; do  
     [ ! -d "$DEBIAN_ISO/$i" ] && continue  
     exclude_dir_size="$(($exclude_dir_size + $(LC_ALL=C du -Lks "$DEBIAN_ISO/$i" | awk -F" " '{print $1}')))"  
   done  
   template_iso_size="$(LC_ALL=C echo "scale=0; ($template_iso_size - $exclude_dir_size)/1024" | bc -l)"  # converted as MB.  
 fi  
 target_iso_size="$(($template_iso_size + $img_size_sum))"  
   
 #  
473  # Possible kernel/initrd paths are /casper (created by casper) or /live (created by live-initramfs)  # Possible kernel/initrd paths are /casper (created by casper) or /live (created by live-initramfs)
474  # Find the kernel and initrd in $DEBIAN_ISO_TMP/casper or $DEBIAN_ISO_TMP/live  # Find the kernel and initrd in $DEBIAN_ISO_TMP/casper or $DEBIAN_ISO_TMP/live
475  # Ex: $DEBIAN_ISO_TMP/casper/vmlinuz1, /$DEBIAN_ISO_TMP/casper/initrd1.img  # Ex: $DEBIAN_ISO_TMP/casper/vmlinuz1, /$DEBIAN_ISO_TMP/casper/initrd1.img
# Line 514  if [ -z "$krnfile" -o -z "$irdfile" ]; t Line 504  if [ -z "$krnfile" -o -z "$irdfile" ]; t
504     exit 1     exit 1
505  fi  fi
506    
507    if [ "$template_mode" = "from-booting-live-media" ]; then
508      # From boot media (clonezilla live), DEBIAN_ISO_TMP is LIVE_MEDIA
509      # The dirs/files in Clonezilla live:
510      # -r--r--r--  1 root root  117 2010-05-21 21:17 Clonezilla-Live-Version
511      # -r--r--r--  1 root root  18K 2010-05-21 21:05 COPYING
512      # dr-xr-xr-x  2 root root 2.0K 2010-05-21 21:17 isolinux/
513      # dr-xr-xr-x  2 root root 2.0K 2010-05-21 21:17 live/
514      # dr-xr-xr-x  2 root root 2.0K 2010-05-21 21:17 syslinux/
515      # dr-xr-xr-x  5 root root 2.0K 2010-05-21 21:17 utils/
516      # We need all of them.
517      template_iso_size="$(LC_ALL=C du -Lmsc $LIVE_MEDIA/{Clonezilla-Live-Version,COPYING,isolinux,$sys_files_dir,syslinux,utils} | tail -n 1 | awk -F" " '{print $1}')"
518    else
519      # From iso file (debian-live-for-ocs.iso)
520      # The dirs/files in Debian live for OCS:
521      # dr-xr-xr-x  3 root root 4.0K 2010-05-28 18:03 doc/
522      # dr-xr-xr-x  2 root root 4.0K 2010-05-28 18:03 isolinux/
523      # dr-xr-xr-x  2 root root 2.0K 2010-05-28 18:03 live/
524      # -r--r--r--  1 root root 3.7K 2010-05-28 18:03 md5sum.txt
525      # We only need dirs isolinux and live only
526      template_iso_size="$(LC_ALL=C du -Lmsc $DEBIAN_ISO_TMP/{isolinux,$sys_files_dir} | tail -n 1 | awk -F" " '{print $1}')"
527    fi
528    target_iso_size="$(($template_iso_size + $img_size_sum))"
529    
530  #  #
531  BOOT_ITEM_DIR=$ISOLNX_TMP/$sys_files_dir  BOOT_ITEM_DIR=$ISOSYSLNX_TMP/$sys_files_dir
532  [ ! -d $BOOT_ITEM_DIR ] && mkdir $BOOT_ITEM_DIR  [ ! -d $BOOT_ITEM_DIR ] && mkdir $BOOT_ITEM_DIR
533  echo -n "Copying the system files to working dir... This might take a few minutes... "  echo -n "Copying the system files to working dir... This might take a few minutes... "
534  cp -af $DEBIAN_ISO_TMP/$sys_files_dir $ISOLNX_TMP/  cp -af $DEBIAN_ISO_TMP/$sys_files_dir $ISOSYSLNX_TMP/
535  RC=$?  RC=$?
536  if [ "$RC" -ne 0 ]; then  if [ "$RC" -ne 0 ]; then
537    [ "$BOOTUP" = "color" ] && $SETCOLOR_FAILURE    [ "$BOOTUP" = "color" ] && $SETCOLOR_FAILURE
# Line 588  fi Line 601  fi
601    
602  # Create the iso image file  # Create the iso image file
603  # isolinux should be rw, so we have to copy it, and exclude the one in iso image.  # isolinux should be rw, so we have to copy it, and exclude the one in iso image.
604  mkdir -p $ISOLNX_TMP/isolinux/  mkdir -p $ISOSYSLNX_TMP/isolinux/ $ISOSYSLNX_TMP/syslinux/
605  # rsync -a --exclude f*.txt --exclude boot.cat --exclude isolinux.txt --exclude isolinux.bin --exclude splash.rle --exclude doc $DRBL_SCRIPT_PATH/pkg/syslinux/* $ISOLNX_TMP/isolinux/  # rsync -a --exclude f*.txt --exclude boot.cat --exclude isolinux.txt --exclude isolinux.bin --exclude splash.rle --exclude doc $DRBL_SCRIPT_PATH/pkg/syslinux/* $ISOSYSLNX_TMP/isolinux/
606  # we have to overwrite isolinux.bin since vesamenu.c32 should be same version with that.  # we have to overwrite isolinux.bin since vesamenu.c32 should be same version with that.
607  cp -af $isolinux_file $pxelinux_simple_vesamenu $pxelinux_simple_menu $pxelinux_memdisk_file $pxelinux_bg_img $ocs_logo_img_syslinux $pxelinux_chain_file $ISOLNX_TMP/isolinux/  # For isolinux
608    cp -af $isolinux_file $pxelinux_simple_vesamenu $pxelinux_simple_menu $pxelinux_memdisk_file $pxelinux_bg_img $ocs_logo_img_syslinux $pxelinux_chain_file $ISOSYSLNX_TMP/isolinux/
609    # For syslinux
610    cp -af $pxelinux_simple_vesamenu $pxelinux_simple_menu $pxelinux_memdisk_file $pxelinux_bg_img $ocs_logo_img_syslinux $pxelinux_chain_file $ISOSYSLNX_TMP/syslinux/
611    
612  etherboot_zlilo="$($query_pkglist_cmd drbl-etherboot 2>/dev/null | grep -E "eb-.*-etherboot-pci.zlilo$")"  etherboot_zlilo="$($query_pkglist_cmd drbl-etherboot 2>/dev/null | grep -E "eb-.*-etherboot-pci.zlilo$")"
613  # we have to force it name as etherboot.zdsk, since isolinux only uses the "plain" ISO 9660 filenames, i.e. it does not support Rock Ridge or Joliet filenames.  # we have to force it name as etherboot.zdsk, since isolinux only uses the "plain" ISO 9660 filenames, i.e. it does not support Rock Ridge or Joliet filenames.
# Line 672  get_live_boot_param $DEBIAN_ISO_TMP/isol Line 688  get_live_boot_param $DEBIAN_ISO_TMP/isol
688    
689  #  #
690  if [ -n "$ocs_image" ]; then  if [ -n "$ocs_image" ]; then
691    ocs-live-boot-menu $ocs_live_boot_menu_option -l $lang_answer -f $VGA_MODE_DEF -b $bg_mode -k /$sys_files_dir/$krnfile -i /$sys_files_dir/$irdfile -m $ocs_logo_img_syslinux $boot_menu_opt --boot-param "$boot_param $live_extra_boot_param noswap nolocales ocs_live_run=\"$ocs_live_run\" ocs_live_extra_param=\"$ocs_live_extra_param\" ocs_live_keymap=\"$ocs_live_keymap\" ocs_live_batch=\"$ocs_live_batch\" ocs_lang=\"$ocs_lang\"" --title "clonezilla live with img $ocs_image" isolinux $ISOLNX_TMP/isolinux/    # For isolinux
692      ocs-live-boot-menu $ocs_live_boot_menu_option -l $lang_answer -f $VGA_MODE_DEF -b $bg_mode -k /$sys_files_dir/$krnfile -i /$sys_files_dir/$irdfile -m $ocs_logo_img_syslinux $boot_menu_opt --boot-param "$boot_param $live_extra_boot_param $supp_boot_param_ocs_live_iso ocs_live_run=\"$ocs_live_run\" ocs_live_extra_param=\"$ocs_live_extra_param\" ocs_live_keymap=\"$ocs_live_keymap\" ocs_live_batch=\"$ocs_live_batch\" ocs_lang=\"$ocs_lang\"" --title "clonezilla live with img $ocs_image" isolinux $ISOSYSLNX_TMP/isolinux/
693      # For syslinux
694      ocs-live-boot-menu $ocs_live_boot_menu_option -l $lang_answer -f $VGA_MODE_DEF -b $bg_mode -k /$sys_files_dir/$krnfile -i /$sys_files_dir/$irdfile -m $ocs_logo_img_syslinux $boot_menu_opt --boot-param "$boot_param $live_extra_boot_param $supp_boot_param_ocs_live_dev ocs_live_run=\"$ocs_live_run\" ocs_live_extra_param=\"$ocs_live_extra_param\" ocs_live_keymap=\"$ocs_live_keymap\" ocs_live_batch=\"$ocs_live_batch\" ocs_lang=\"$ocs_lang\"" --title "clonezilla live with img $ocs_image" syslinux $ISOSYSLNX_TMP/syslinux/
695  else  else
696    ocs-live-boot-menu $ocs_live_boot_menu_option -l $lang_answer -f $VGA_MODE_DEF -b $bg_mode -k /$sys_files_dir/$krnfile -i /$sys_files_dir/$irdfile -m $ocs_logo_img_syslinux $boot_menu_opt --boot-param "$boot_param $live_extra_boot_param noswap nolocales ocs_live_run=\"$ocs_live_run\" ocs_live_extra_param=\"$ocs_live_extra_param\" ocs_live_keymap=\"$ocs_live_keymap\" ocs_live_batch=\"$ocs_live_batch\" ocs_lang=\"$ocs_lang\"" isolinux $ISOLNX_TMP/isolinux/    # For isolinux
697      ocs-live-boot-menu $ocs_live_boot_menu_option -l $lang_answer -f $VGA_MODE_DEF -b $bg_mode -k /$sys_files_dir/$krnfile -i /$sys_files_dir/$irdfile -m $ocs_logo_img_syslinux $boot_menu_opt --boot-param "$boot_param $live_extra_boot_param $supp_boot_param_ocs_live_iso ocs_live_run=\"$ocs_live_run\" ocs_live_extra_param=\"$ocs_live_extra_param\" ocs_live_keymap=\"$ocs_live_keymap\" ocs_live_batch=\"$ocs_live_batch\" ocs_lang=\"$ocs_lang\"" isolinux $ISOSYSLNX_TMP/isolinux/
698      # For syslinux
699      ocs-live-boot-menu $ocs_live_boot_menu_option -l $lang_answer -f $VGA_MODE_DEF -b $bg_mode -k /$sys_files_dir/$krnfile -i /$sys_files_dir/$irdfile -m $ocs_logo_img_syslinux $boot_menu_opt --boot-param "$boot_param $live_extra_boot_param $supp_boot_param_ocs_live_dev ocs_live_run=\"$ocs_live_run\" ocs_live_extra_param=\"$ocs_live_extra_param\" ocs_live_keymap=\"$ocs_live_keymap\" ocs_live_batch=\"$ocs_live_batch\" ocs_lang=\"$ocs_lang\"" syslinux $ISOSYSLNX_TMP/syslinux/
700  fi  fi
701    
702  #  #
703  echo "Preparing syslinux.exe, syslinux, makeboot.bat and makeboot.sh in dir utils... "  echo "Preparing syslinux, syslinux.exe, makeboot.sh, and makeboot.bat in dir utils... "
704  # If it's in Clonezilla live environment, we have those files  # If it's in Clonezilla live environment, we have those files
705  if [ -e "$LIVE_MEDIA/utils/linux/syslinux" -a \  if [ -e "$LIVE_MEDIA/utils/linux/syslinux" -a \
706       -e "$LIVE_MEDIA/utils/mbr/mbr.bin" -a \       -e "$LIVE_MEDIA/utils/mbr/mbr.bin" -a \
707       -e "$LIVE_MEDIA/utils/win32/syslinux.exe" ]; then       -e "$LIVE_MEDIA/utils/win32/syslinux.exe" ]; then
708    cp -rf $LIVE_MEDIA/utils $ISOLNX_TMP    cp -rf $LIVE_MEDIA/utils $ISOSYSLNX_TMP
709  else  else
710    put_syslinux_makeboot_for_usb_flash $ISOLNX_TMP    put_syslinux_makeboot_for_usb_flash $ISOSYSLNX_TMP
711  fi  fi
712  if [ -d "$ISOLNX_TMP/utils" ]; then  if [ -d "$ISOSYSLNX_TMP/utils" ]; then
713    utils_files_dir_graft_point="/utils/=$ISOLNX_TMP/utils/"    utils_files_dir_graft_point="/utils/=$ISOSYSLNX_TMP/utils/"
714  fi  fi
715    
716  # put version tag  # put version tag
717  # The content is like clonezilla-live-20070308  # The content is like clonezilla-live-20070308
718  echo "clonezilla-live-${iso_label_tag}" > $ISOLNX_TMP/Clonezilla-Live-Version  echo "clonezilla-live-${iso_label_tag}" > $ISOSYSLNX_TMP/Clonezilla-Live-Version
719  echo "This Clonezilla live iso file was created by this command:" >> $ISOLNX_TMP/Clonezilla-Live-Version  echo "This Clonezilla live iso file was created by this command:" >> $ISOSYSLNX_TMP/Clonezilla-Live-Version
720  echo "$prog $prog_option" >> $ISOLNX_TMP/Clonezilla-Live-Version  echo "$prog $prog_option" >> $ISOSYSLNX_TMP/Clonezilla-Live-Version
721    
722  # $sys_files_dir maybe /casper, /live or /isolinux. If it is isolinux, we can not list them twice otherwise mkisofs will go wrong.  # $sys_files_dir maybe /casper, /live or /isolinux. If it is isolinux, we can not list them twice otherwise mkisofs will go wrong.
723  if [ "$sys_files_dir" != "isolinux" ]; then  if [ "$sys_files_dir" != "isolinux" ]; then
724    sys_files_dir_graft_point="/isolinux/=$ISOLNX_TMP/isolinux/ /$sys_files_dir/=$ISOLNX_TMP/$sys_files_dir/"    sys_files_dir_graft_point="/isolinux/=$ISOSYSLNX_TMP/isolinux/ /syslinux/=$ISOSYSLNX_TMP/syslinux/ /$sys_files_dir/=$ISOSYSLNX_TMP/$sys_files_dir/"
725  else  else
726    sys_files_dir_graft_point="/isolinux/=$ISOLNX_TMP/isolinux/"    sys_files_dir_graft_point="/isolinux/=$ISOSYSLNX_TMP/isolinux/ /syslinux/=$ISOSYSLNX_TMP/syslinux/"
727  fi  fi
728    
729  # If template_mode="from-booting-live-media", then there is /COPYING and /Clonezilla-Live-Version, then we should not assign that.  # If template_mode="from-booting-live-media", then there is /COPYING and /Clonezilla-Live-Version, then we should not assign that.
730  doc_insert_in_root=""  doc_insert_in_root=""
731  if [ ! -e "$DEBIAN_ISO_TMP/COPYING" ]; then  if [ -e "$DEBIAN_ISO_TMP/COPYING" ]; then
732      doc_insert_in_root="/COPYING=$DEBIAN_ISO_TMP/COPYING"
733    else
734    doc_insert_in_root="/COPYING=$DRBL_SCRIPT_PATH/doc/COPYING"    doc_insert_in_root="/COPYING=$DRBL_SCRIPT_PATH/doc/COPYING"
735  fi  fi
736  if [ ! -e "$DEBIAN_ISO_TMP/Clonezilla-Live-Version" ]; then  if [ -e "$DEBIAN_ISO_TMP/Clonezilla-Live-Version" ]; then
737    doc_insert_in_root="$doc_insert_in_root /Clonezilla-Live-Version=$ISOLNX_TMP/Clonezilla-Live-Version"    doc_insert_in_root="$doc_insert_in_root /Clonezilla-Live-Version=$DEBIAN_ISO_TMP/Clonezilla-Live-Version"
738    else
739      doc_insert_in_root="$doc_insert_in_root /Clonezilla-Live-Version=$ISOSYSLNX_TMP/Clonezilla-Live-Version"
740  fi  fi
741    
742  #  #
# Line 730  echo "genisoimage \ Line 756  echo "genisoimage \
756   -b isolinux/isolinux.bin -c isolinux/boot.cat \   -b isolinux/isolinux.bin -c isolinux/boot.cat \
757   -no-emul-boot -boot-load-size 4 -boot-info-table \   -no-emul-boot -boot-load-size 4 -boot-info-table \
758   $mkiso_exclude_opt \   $mkiso_exclude_opt \
759   -graft-points $DEBIAN_ISO_TMP \   -graft-points \
760    $sys_files_dir_graft_point \    $sys_files_dir_graft_point \
761    $utils_files_dir_graft_point \    $utils_files_dir_graft_point \
762    $doc_insert_in_root \    $doc_insert_in_root \
# Line 740  echo "genisoimage \ Line 766  echo "genisoimage \
766  "  "
767    
768  echo "DEBIAN_ISO_TMP=$DEBIAN_ISO_TMP"  echo "DEBIAN_ISO_TMP=$DEBIAN_ISO_TMP"
769  echo "sys_files_dir_graft_point=$sys_files_dir_graft_point"  echo "mkiso_exclude_opt = $mkiso_exclude_opt"
770  echo "utils_files_dir_graft_point=$utils_files_dir_graft_point"  echo "allow_limited_size_opt = $allow_limited_size_opt"
771  echo "doc_insert_in_root=$doc_insert_in_root"  echo "sys_files_dir_graft_point = $sys_files_dir_graft_point"
772  echo "ocs_imgs_with_abs_path=$ocs_imgs_with_abs_path"  echo "utils_files_dir_graft_point = $utils_files_dir_graft_point"
773  echo "custom_ocs_opt=$custom_ocs_opt"  echo "doc_insert_in_root = $doc_insert_in_root"
774  echo "include_dir_graft_point=$include_dir_graft_point"  echo "ocs_imgs_with_abs_path = $ocs_imgs_with_abs_path"
775    echo "custom_ocs_opt = $custom_ocs_opt"
776    echo "include_dir_graft_point = $include_dir_graft_point"
777  echo  echo
778  echo "ocs_image=$ocs_image"  echo "ocs_image=$ocs_image"
779  echo "image_path=$image_path"  echo "image_path=$image_path"
780    
781  #read  read
782    
783    # if [ -z "$ORIGINAL_INSERT_MODE" ];then
784    #     A_LINE=`grep 'append initrd=/live/initrd.img'/tmp/ocs_isos*/isolinux/isolinux.cfg | sed '2,$d'`
785    #     PARAM=`echo "$A_LINE" | sed 's/.*ocs_live_extra_param="\([^"]*\)".*/\1/'`
786    #     KEYMAP=`echo "$A_LINE" | sed 's/.*ocs_live_keymap="\([^"]*\)".*/\1/'`
787    #     LANG=`echo "$A_LINE" | sed 's/.*ocs_lang="\([^"]*\)".*/\1/'`
788    #     if [ -z "$going2RAM" ];then
789    #         #cp /restorecd/isolinux-restore-cd.cfg /tmp/ocs_isos*/isolinux/isolinux.cfg
790    #         cfg_orig=/restorecd/isolinux-restore-cd.cfg
791    #     else
792    #         #cp /restorecd/isolinux-restore-cd-ram.cfg /tmp/ocs_isos*/isolinux/isolinux.cfg
793    #         cfg_orig=/restorecd/isolinux-restore-cd-ram.cfg
794    #     fi
795    # # replace with current values
796    #     sed "s|ocs_live_extra_param=\"[^\"]*\"|ocs_live_extra_param=\"$PARAM\"|
797    # s|ocs_live_keymap=\"[^\"]*\"|ocs_live_keymap=\"$KEYMAP\"|
798    # s|ocs_lang=\"[^\"]*\"|ocs_lang=\"$LANG\"|
799    # " "$cfg_orig" >  /tmp/ocs_isos*/isolinux/isolinux.cfg
800    
801  cust-menu -publisher "DRBL/Clonezilla http://drbl.name http://clonezilla.org" -V "$iso_label_tag" "$going2RAM"      cust-menu -publisher "DRBL/Clonezilla http://drbl.name http://clonezilla.org" -V "$iso_label_tag" "$ORIGINAL_INSERT_MODE" "$going2RAM"
802    # fi
803    
804    # Fix missing "boot=live"
805    for n in /tmp/ocs_isos*/isolinux/isolinux.cfg /tmp/ocs_isos*/syslinux/syslinux.cfg;do
806    if [ -e "$n" ];then
807    sed 's/boot=[^ ]* //
808    s{initrd=/live/initrd.img{initrd=/live/initrd.img boot=live {' "$n" > "$n".tmp && mv "$n".tmp "$n"
809    fi
810    done
811    
812  if [ -n "$going2RAM" ];then  if [ -n "$going2RAM" ];then
813      ocs_imgs_with_abs_path=''      ocs_imgs_with_abs_path=''
# Line 774  genisoimage \ Line 828  genisoimage \
828   -b isolinux/isolinux.bin -c isolinux/boot.cat \   -b isolinux/isolinux.bin -c isolinux/boot.cat \
829   -no-emul-boot -boot-load-size 4 -boot-info-table \   -no-emul-boot -boot-load-size 4 -boot-info-table \
830   $mkiso_exclude_opt \   $mkiso_exclude_opt \
831   -graft-points $DEBIAN_ISO_TMP \   -graft-points \
832    $sys_files_dir_graft_point \    $sys_files_dir_graft_point \
833    $utils_files_dir_graft_point \    $utils_files_dir_graft_point \
834    $doc_insert_in_root \    $doc_insert_in_root \
# Line 799  if [ "$rc" -gt 0 ]; then Line 853  if [ "$rc" -gt 0 ]; then
853    [ "$BOOTUP" = "color" ] && $SETCOLOR_FAILURE    [ "$BOOTUP" = "color" ] && $SETCOLOR_FAILURE
854    echo "Something went wrong!"    echo "Something went wrong!"
855    [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL    [ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL
856    umount $DEBIAN_ISO_TMP &>/dev/null    clean_tmp_dir
   if [ ! -z "$DEBIAN_ISO_TMP" -a \  
           "$template_mode" = "from-downloaded-live-media" ]; then  
     # We put some tmp file when template_mode is from-downloaded-live-media  
     rm -rf $DEBIAN_ISO_TMP  
   fi  
857    [ -n "$target_iso" -a -f "$target_iso" ] && rm -fv $target_iso    [ -n "$target_iso" -a -f "$target_iso" ] && rm -fv $target_iso
858    [ -n "$ISOLNX_TMP" -a -d "$ISOLNX_TMP" ] && rm -rf $ISOLNX_TMP    [ -n "$ISOLNX_TMP" -a -d "$ISOLNX_TMP" ] && rm -rf $ISOLNX_TMP
859    [ -n "$WD_TMP" -a -d "$WD_TMP" ] && rm -rf $WD_TMP    [ -n "$WD_TMP" -a -d "$WD_TMP" ] && rm -rf $WD_TMP
# Line 817  umount $DEBIAN_ISO_TMP &>/dev/null Line 866  umount $DEBIAN_ISO_TMP &>/dev/null
866    
867  # Clean the tmp working directory  # Clean the tmp working directory
868  echo "Cleaning tmp dirs..."  echo "Cleaning tmp dirs..."
869  if [ ! -z "$DEBIAN_ISO_TMP" -a \  clean_tmp_dir
           "$template_mode" = "from-downloaded-live-media" ]; then  
   # We put some tmp file when template_mode is from-downloaded-live-media  
   rm -rf $DEBIAN_ISO_TMP  
 fi  
 [ -n "$ISOLNX_TMP" -a -d "$ISOLNX_TMP" ] && rm -rf $ISOLNX_TMP  
 [ -n "$WD_TMP" -a -d "$WD_TMP" ] && rm -rf $WD_TMP  
870    
871  #  #
872  if [ -e "$target_iso" ]; then  if [ -e "$target_iso" ]; then

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

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26