OSDN Git Service

1-install: cancel auto update mode if no partition found
authorChih-Wei Huang <cwhuang@linux.org.tw>
Tue, 22 Jun 2021 15:06:06 +0000 (23:06 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Tue, 22 Jun 2021 15:06:06 +0000 (23:06 +0800)
The auto update mode (AUTO_INSTALL=update) tries to find a partition
labelled as Android-x86 or an ext4 partition. If no such a partition
is found, the auto mode should be cancelled.

Fixes: 244e03f0 ("Add auto installation function")

install/scripts/1-install

index 54401c4..644b3d6 100644 (file)
@@ -552,6 +552,7 @@ install_hd()
                        answer=${answer:-$(blkid | grep -v loop | sort | grep ext4 | cut -d: -f1 | head -1)}
                        [ -b "$answer" -o -b /dev/$answer ] && answer=`basename $answer` || answer=
                        AUTO_UPDATE=${answer:-$AUTO_UPDATE}
+                       [ -z "$AUTO_UPDATE" ] && AUTO_INSTALL=
                        ;;
                *)
                        [ -z "$answer" ] && set_answer_if_auto Create