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

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

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

revision 103 by sng, Wed Aug 25 11:40:55 2010 UTC revision 164 by sng, Sat Apr 9 21:34:35 2011 UTC
# Line 1  Line 1 
1  ##############################################################################  ##############################################################################
2  #                                                                            #  #                                                                            #
3  # patch-clonezilla-sysresccd, (C) 2007-2010 S. Georgaras <sng@hellug.gr>     #  # patch-clonezilla-sysresccd, (C) 2007-2011 S. Georgaras <sng@hellug.gr>     #
4  #                                                                            #  #                                                                            #
5  # This file is part of Clonezilla-SysRescCD.                                 #  # This file is part of Clonezilla-SysRescCD.                                 #
6  #                                                                            #  #                                                                            #
# Line 304  test "$(whoami)" = "root" || noRoot Line 304  test "$(whoami)" = "root" || noRoot
304    
305  # Check parameters  # Check parameters
306  [ -z "$inputFile" ] && {  [ -z "$inputFile" ] && {
307    echo "    Error: Parameter -i (input file) not specified!!!"    printHelp
308    exit 1    exit 1
309  }  }
310  [ -z "$mainSplash" ] || {  [ -z "$mainSplash" ] || {
# Line 364  test "$(whoami)" = "root" || noRoot Line 364  test "$(whoami)" = "root" || noRoot
364    }    }
365  }  }
366  printVersion  printVersion
367    # set -x
368  echo -n "Mounting files...   "  echo -n "Mounting files...   "
369  isClonezillaSysRescCDRunning  isClonezillaSysRescCDRunning
370    
# Line 382  if [ -z $(mount | grep "$inputFile" | se Line 382  if [ -z $(mount | grep "$inputFile" | se
382      # working with ClonezillaSysRescCD      # working with ClonezillaSysRescCD
383      mountPoint=/mountPoint.$$      mountPoint=/mountPoint.$$
384    fi    fi
385      mountOptions="-oro"
386    if [ -z "$workingFromCD" ];then    if [ -z "$workingFromCD" ];then
387      # working with ClonezillaSysRescCD image      # working with ClonezillaSysRescCD image
388      mountOptions="-oloop"      mountOptions="-oloop"
# Line 403  if [ -z $(mount | grep "$inputFile" | se Line 404  if [ -z $(mount | grep "$inputFile" | se
404    fi    fi
405  else  else
406    # our inputFile is mounted!!!    # our inputFile is mounted!!!
407    mountPoint=$(mount | grep "$inputFile" | grep 's|.* on \(.*\) type .*)|\1|')    mountPoint=$(mount | grep "$inputFile" | sed 's|.* on \(.*\) type .*)|\1|')
408  fi  fi
409  ##############################################################################  ##############################################################################
410    
# Line 455  cp -r "$mountPoint"/* "$savePartitionMou Line 456  cp -r "$mountPoint"/* "$savePartitionMou
456    
457  else  else
458    
459    # if [ -z "$mountPoint" ];then
460    #     echo "mountPoint is empty!!!"
461    #     exit
462    # fi
463    
464  for n in "$mountPoint"/*;do  for n in "$mountPoint"/*;do
465  if [ "$n" != "$savePartitionMountPoint" ] && [ "$n" != "/proc" \ && [ "$n" != "/sys" ];then  if [ "$n" != "$savePartitionMountPoint" ] && [ "$n" != "/proc" ] && [ "$n" != "/sys" ];then
466    cp -r "mountPoint"/"$n" "$savePartitionMountPoint"/new-iso 2>/dev/null || {    cp -r "$n" "$savePartitionMountPoint"/new-iso 2>/dev/null || {
467      echo "failed"      echo "failed"
468      echo      echo
469      cleanUp      cleanUp

Legend:
Removed from v.103  
changed lines
  Added in v.164

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26