64 |
if [ "$clonType" = "i686" ];then |
if [ "$clonType" = "i686" ];then |
65 |
clonType="$clonType"-pae |
clonType="$clonType"-pae |
66 |
fi |
fi |
67 |
clonIso="http://sourceforge.net/projects/clonezilla/files/clonezilla_live_stable/OldFiles/"$clonVersion"/clonezilla-live-"$clonVersion"-"$clonType".iso/download" |
clonIso="http://downloads.sourceforge.net/project/clonezilla/clonezilla_live_stable/OldFiles/"$clonVersion"/clonezilla-live-"$clonVersion"-"$clonType".iso?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fclonezilla%2Ffiles%2Fclonezilla_live_stable%2FOldFiles%2F"$clonVersion"%2F" |
68 |
downloadClonezillaLive |
downloadClonezillaLive |
69 |
done |
done |
70 |
else |
else |
72 |
if [ "$clonType" = "i686" ];then |
if [ "$clonType" = "i686" ];then |
73 |
clonType="$clonType"-pae |
clonType="$clonType"-pae |
74 |
fi |
fi |
75 |
clonIso="http://sourceforge.net/projects/clonezilla/files/clonezilla_live_stable/OldFiles/"$clonVersion"/clonezilla-live-"$clonVersion"-"$clonType".iso/download" |
clonIso="http://downloads.sourceforge.net/project/clonezilla/clonezilla_live_stable/OldFiles/"$clonVersion"/clonezilla-live-"$clonVersion"-"$clonType".iso?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fclonezilla%2Ffiles%2Fclonezilla_live_stable%2FOldFiles%2F"$clonVersion"%2F" |
76 |
downloadClonezillaLive |
downloadClonezillaLive |
77 |
fi |
fi |
78 |
|
|
190 |
|
|
191 |
# Check if we have to go to OldFiles |
# Check if we have to go to OldFiles |
192 |
echo "Checking file availability..." |
echo "Checking file availability..." |
193 |
oldFiles="$(curl -IL "$clonIso" | grep '301 Moved Permanently')" |
oldFiles="$(curl -IL "$clonIso" | grep 'Location: http://')" |
194 |
if [ -n "$oldFiles" ];then |
if [ -z "$oldFiles" ];then |
195 |
# go to stable |
# go to stable |
196 |
clonIso="$(echo "$clonIso" | sed 's{OldFiles/{{')" |
clonIso="$(echo "$clonIso" | sed 's{OldFiles/{{' | sed 's{OldFiles%2F{{')" |
197 |
echo "This is Clonezilla Live Stable!!!" |
echo ">>>>>> This is Clonezilla Live Stable!!!" |
198 |
else |
else |
199 |
echo "This is an older Clonezilla Live version!!!" |
echo ">>>>>> This is an older Clonezilla Live version!!!" |
200 |
fi |
fi |
201 |
|
|
202 |
# Download file |
# Download file |
445 |
order to succesfully build Clonezilla-SysRescCD. |
order to succesfully build Clonezilla-SysRescCD. |
446 |
[arch] refers to Clonezilla Live architecture |
[arch] refers to Clonezilla Live architecture |
447 |
(i686,i486 or amd64 - use all to get them all) |
(i686,i486 or amd64 - use all to get them all) |
448 |
|
SystemRescueCD will be downloaded in any case |
449 |
v print version and exit |
v print version and exit |
450 |
h print this screen and exit |
h print this screen and exit |
451 |
|
|
658 |
downloadIsoFiles $ARCH |
downloadIsoFiles $ARCH |
659 |
exit |
exit |
660 |
fi |
fi |
661 |
# chack auto mode |
# check auto mode |
662 |
if [ -n "$auto" ];then |
if [ -n "$auto" ];then |
663 |
if [ -z "$usingProfile" ];then |
if [ -z "$usingProfile" ];then |
664 |
echo ' Error: Parameter -a used without -p' |
echo ' Error: Parameter -a used without -p' |
703 |
# |
# |
704 |
# Is this correct? (y/[n]): " |
# Is this correct? (y/[n]): " |
705 |
|
|
706 |
if [ -n "$auto" ]; then |
if [ -n "$auto" ]; then |
707 |
ans=y |
ans=y |
708 |
else |
else |
709 |
echo -n "Current settings: |
echo -n "Current settings: |
710 |
System Rescue CD: $sysCD |
System Rescue CD: $sysCD |
711 |
Clonezilla Live CD: $cloneCD |
Clonezilla Live CD: $cloneCD |
712 |
isolinux.cfg to use: $cfgFile |
isolinux.cfg to use: $cfgFile |
713 |
script to execute: $exScript |
script to execute: $exScript |
714 |
|
|
715 |
Is this correct? (y/[n]): " |
Is this correct? (y/[n]): " |
716 |
|
|
717 |
read ans |
read ans |
718 |
fi |
fi |
719 |
if [ "$ans" = "n" ] || [ "$ans" = "N" ] || [ "$ans" = "" ];then |
if [ "$ans" = "n" ] || [ "$ans" = "N" ] || [ "$ans" = "" ];then |
720 |
sysCD='' |
sysCD='' |
721 |
cloneCD='' |
cloneCD='' |
759 |
createTempFolders |
createTempFolders |
760 |
|
|
761 |
echo -n "Mounting ISO files... " |
echo -n "Mounting ISO files... " |
762 |
mount "$sysCD" "$SAVE_DIR"/tmp/syscd -o loop || errorMount ' Error mounting "System Rescue CD" file' |
mount "$sysCD" "$SAVE_DIR"/tmp/syscd -o ro,loop || errorMount ' Error mounting "System Rescue CD" file' |
763 |
mount "$cloneCD" "$SAVE_DIR"/tmp/clonecd -o loop || errorMount ' Error mounting Clonezilla" file' |
mount "$cloneCD" "$SAVE_DIR"/tmp/clonecd -o ro,loop || errorMount ' Error mounting Clonezilla" file' |
764 |
echo 'done' |
echo 'done' |
765 |
echo -n "Copying files... " |
echo -n "Copying files... " |
766 |
cp -RL "$SAVE_DIR"/tmp/syscd/* "$SAVE_DIR"/tmp/clonezilla-sysresccd |
cp -RL "$SAVE_DIR"/tmp/syscd/* "$SAVE_DIR"/tmp/clonezilla-sysresccd |
924 |
cd "$SAVE_DIR"/tmp/clonezilla-sysresccd/live |
cd "$SAVE_DIR"/tmp/clonezilla-sysresccd/live |
925 |
unsquashfs filesystem.squashfs 2>/dev/null 1>&2 |
unsquashfs filesystem.squashfs 2>/dev/null 1>&2 |
926 |
cp -r ../README* ../doc ../restorecd squashfs-root |
cp -r ../README* ../doc ../restorecd squashfs-root |
927 |
mksquashfs squashfs-root aa.squashfs -always-use-fragments -no-duplicates -all-root 2>/dev/null 1>&2 |
# mksquashfs squashfs-root aa.squashfs -always-use-fragments -no-duplicates -all-root 2>/dev/null 1>&2 |
928 |
|
if [ "$clonType" = "amd64" ];then |
929 |
|
mksquashfs squashfs-root aa.squashfs -comp xz -Xbcj ia64 -Xdict-size 75% -always-use-fragments -no-duplicates -all-root 2>/dev/null 1>&2 |
930 |
|
else |
931 |
|
mksquashfs squashfs-root aa.squashfs -comp xz -Xbcj x86 -Xdict-size 75% -always-use-fragments -no-duplicates -all-root 2>/dev/null 1>&2 |
932 |
|
fi |
933 |
mv aa.squashfs filesystem.squashfs |
mv aa.squashfs filesystem.squashfs |
934 |
rm -rf squashfs-root |
rm -rf squashfs-root |
935 |
cd |
cd |