OSDN Git Service

1-install: move try_upgrade to an earlier step
authorChih-Wei Huang <cwhuang@linux.org.tw>
Wed, 6 May 2020 16:10:18 +0000 (00:10 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Wed, 6 May 2020 16:10:18 +0000 (00:10 +0800)
The try_upgrade should be run before checking whether system
was installed as the read-write mode.

install/scripts/1-install

index 16711f1..1e39375 100644 (file)
@@ -484,6 +484,8 @@ install_to()
                fi
        fi
 
+       try_upgrade hd/$asrc
+
        ! test -f hd/$asrc/system.img -o -d hd/$asrc/system
        set_answer_if_auto $?
        adialog --title " Question " --defaultno --yesno \
@@ -505,7 +507,7 @@ install_to()
        for s in `du -sk $files | awk '{print $1}'`; do
                size=$(($size+$s))
        done
-       try_upgrade hd/$asrc
+
        mkdir -p hd/$asrc
        cd hd/$asrc
        rm -rf system*