diff --git a/builds/any/installer/installer.sh.in b/builds/any/installer/installer.sh.in index fc2a95fa..eccd3ad4 100644 --- a/builds/any/installer/installer.sh.in +++ b/builds/any/installer/installer.sh.in @@ -399,6 +399,23 @@ installer_mkchroot "${rootdir}" mkdir -p "${rootdir}/mnt/installer" mount -o ro,bind "${installer_dir}" "${rootdir}/mnt/installer" +blkid_find_onie() { + local dev label + dev=$1; shift + label=$1; shift + rest="$@" + + installer_say "Examining $dev --> $label" + if test "$label" = "ONIE-BOOT"; then + installer_say "Found ONIE-BOOT at $dev" + ONIE_BOOT_DEVICE="$dev" + return 2 + fi + + # not found, skip + return 0 +} + # make sure onie-boot is mounted if test -d /mnt/onie-boot; then if grep -q " /mnt/onie-boot " /proc/mounts; then diff --git a/packages/base/all/vendor-config-onl/src/lib/install/lib.sh b/packages/base/all/vendor-config-onl/src/lib/install/lib.sh index cce68557..388ab892 100644 --- a/packages/base/all/vendor-config-onl/src/lib/install/lib.sh +++ b/packages/base/all/vendor-config-onl/src/lib/install/lib.sh @@ -5,7 +5,7 @@ # helper functions for install # ###################################################################### - + installer_reboot() { local dummy sts timeout trapsts if test $# -gt 0; then @@ -130,7 +130,7 @@ visit_blkid() rest="$@" local ifs - ifs=IFS; IFS=$CR + ifs=$IFS; IFS=$CR for line in $(blkid); do IFS=$ifs @@ -159,8 +159,11 @@ visit_blkid() done local sts - eval $fn \"$dev\" \"$LABEL\" \"$UUID\" \"$PARTLABEL\" \"$PARTUUID\" $rest - sts=$? + if eval $fn \"$dev\" \"$LABEL\" \"$UUID\" \"$PARTLABEL\" \"$PARTUUID\" $rest; then + sts=0 + else + sts=$? + fi if test $sts -eq 2; then break; fi if test $sts -ne 0; then return $sts; fi