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 |
# # |
# # |
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" ] || { |
364 |
} |
} |
365 |
} |
} |
366 |
printVersion |
printVersion |
367 |
|
# set -x |
368 |
echo -n "Mounting files... " |
echo -n "Mounting files... " |
369 |
isClonezillaSysRescCDRunning |
isClonezillaSysRescCDRunning |
370 |
|
|
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" |
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 |
|
|
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 |