mirror of
https://github.com/Telecominfraproject/OpenNetworkLinux.git
synced 2025-12-25 17:27:01 +00:00
Merge pull request #97 from carlroth/master
Add missing ONIE label-finder, fix bugs in blkid scanner
This commit is contained 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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user