mirror of
https://github.com/Dasharo/scripts.git
synced 2026-03-06 14:51:26 -08:00
adjust partition # used for cbfstool for Cloudready OS
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
This commit is contained in:
13
functions.sh
13
functions.sh
@@ -8,6 +8,7 @@ num_usb_devs=0
|
||||
usb_device=""
|
||||
isChromeOS=true
|
||||
isChromiumOS=false
|
||||
isCloudready=false
|
||||
flashromcmd=""
|
||||
cbfstoolcmd=""
|
||||
gbbutilitycmd=""
|
||||
@@ -128,12 +129,10 @@ if [ ! -f ${cbfstoolcmd} ]; then
|
||||
if [[ "$isChromeOS" = false && "$isChromiumOS" = false ]]; then
|
||||
cd /tmp
|
||||
else
|
||||
#have to use /dev/sdx12 due to noexec restrictions
|
||||
#have to use partition 12 (27 for cloudready) on rootdev due to noexec restrictions
|
||||
rootdev=$(rootdev -d -s)
|
||||
part_num="12"
|
||||
if [[ "${rootdev}" =~ "mmcblk" ]]; then
|
||||
part_num="p12"
|
||||
fi
|
||||
[[ "$isCloudready" = true ]] && part_num="27" || part_num="12"
|
||||
[[ "${rootdev}" =~ "mmcblk" ]] && part_num="p${part_num}"
|
||||
boot_mounted=$(mount | grep "${rootdev}""${part_num}")
|
||||
if [ "${boot_mounted}" = "" ]; then
|
||||
#mount boot
|
||||
@@ -289,6 +288,10 @@ if [ -f /etc/lsb-release ]; then
|
||||
if [ $? -ne 0 ]; then
|
||||
isChromeOS=false
|
||||
fi
|
||||
cat /etc/lsb-release | grep "neverware" > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
isCloudready=true
|
||||
fi
|
||||
cat /etc/lsb-release | grep "Chromium OS" > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]; then
|
||||
isChromiumOS=true
|
||||
|
||||
Reference in New Issue
Block a user