summaryrefslogtreecommitdiffstats
path: root/rescue/Flash/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'rescue/Flash/scripts')
-rw-r--r--rescue/Flash/scripts/rescue_common11
-rwxr-xr-xrescue/Flash/scripts/reset_rootpass4
-rwxr-xr-xrescue/Flash/scripts/reset_userpass4
-rwxr-xr-xrescue/Flash/scripts/upgrade4
4 files changed, 20 insertions, 3 deletions
diff --git a/rescue/Flash/scripts/rescue_common b/rescue/Flash/scripts/rescue_common
index e1402cacc..77435e6da 100644
--- a/rescue/Flash/scripts/rescue_common
+++ b/rescue/Flash/scripts/rescue_common
@@ -192,3 +192,14 @@ function lumount() {
umount $dir
losetup -d $loop
}
+
+function set_sfs_loop() {
+ local dir=$1
+ sfs_loop_std="$dir$loopbacks_rel/distrib.sqfs"
+ sfs_loop_lzma="$dir$loopbacks_rel/distrib-lzma.sqfs"
+ if [ -e $sfs_loop_lzma ]; then
+ sfs_loop=$sfs_loop_lzma
+ else
+ sfs_loop=$sfs_loop_std
+ fi
+}
diff --git a/rescue/Flash/scripts/reset_rootpass b/rescue/Flash/scripts/reset_rootpass
index dbbaf394f..9fd81155a 100755
--- a/rescue/Flash/scripts/reset_rootpass
+++ b/rescue/Flash/scripts/reset_rootpass
@@ -23,6 +23,8 @@ function prepare() {
return 1
fi
+ set_sfs_loop $rootdir
+
mount -t squashfs -o loop $sfs_loop $tmpdir/squash > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo "Error mounting distrib.sqfs"
@@ -81,7 +83,7 @@ if ! insert_pendrive; then
fi
sys_loop="$rootdir$loopbacks_rel/system.loop"
-sfs_loop="$rootdir$loopbacks_rel/distrib.sqfs"
+sfs_loop= #
if ! prepare; then
cleanup
diff --git a/rescue/Flash/scripts/reset_userpass b/rescue/Flash/scripts/reset_userpass
index d392ecd18..e7c5477eb 100755
--- a/rescue/Flash/scripts/reset_userpass
+++ b/rescue/Flash/scripts/reset_userpass
@@ -23,6 +23,8 @@ function prepare() {
return 1
fi
+ set_sfs_loop $rootdir
+
mount -t squashfs -o loop $sfs_loop $tmpdir/squash > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo "Error mounting distrib.sqfs"
@@ -92,7 +94,7 @@ if ! insert_pendrive; then
fi
sys_loop="$rootdir$loopbacks_rel/system.loop"
-sfs_loop="$rootdir$loopbacks_rel/distrib.sqfs"
+sfs_loop= #
if ! prepare; then
cleanup
diff --git a/rescue/Flash/scripts/upgrade b/rescue/Flash/scripts/upgrade
index 29b87afa8..3a15e7212 100755
--- a/rescue/Flash/scripts/upgrade
+++ b/rescue/Flash/scripts/upgrade
@@ -43,6 +43,8 @@ function prepare() {
return 1
fi
+ set_sfs_loop $rootdir
+
mount -t ext2 -o loop $sys_loop $tmpdir/user > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo "Error mounting system.loop"
@@ -225,7 +227,7 @@ fi
#- works only when upgrading versions with the same layout
sys_loop="$rootdir$loopbacks_rel/system.loop"
-sfs_loop="$rootdir$loopbacks_rel/distrib.sqfs"
+sfs_loop= #
modules_dir="$rootdir$loopbacks_rel/modules"