diff options
Diffstat (limited to 'meta-phosphor/recipes-phosphor/initrdscripts/phosphor-mmc-init/mmc-init.sh')
-rw-r--r-- | meta-phosphor/recipes-phosphor/initrdscripts/phosphor-mmc-init/mmc-init.sh | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/meta-phosphor/recipes-phosphor/initrdscripts/phosphor-mmc-init/mmc-init.sh b/meta-phosphor/recipes-phosphor/initrdscripts/phosphor-mmc-init/mmc-init.sh index 061757519..3fad5e6fa 100644 --- a/meta-phosphor/recipes-phosphor/initrdscripts/phosphor-mmc-init/mmc-init.sh +++ b/meta-phosphor/recipes-phosphor/initrdscripts/phosphor-mmc-init/mmc-init.sh @@ -31,8 +31,7 @@ done # Move the secondary GPT to the end of the device if needed. Look for the GPT # header signature "EFI PART" located 512 bytes from the end of the device. -magic=$(tail -c 512 "${mmcdev}" | hexdump -C -n 8 | grep "EFI PART") -if test -z "${magic}"; then +if ! tail -c 512 "${mmcdev}" | hexdump -C -n 8 | grep -q "EFI PART"; then sgdisk -e "${mmcdev}" partprobe fi @@ -63,4 +62,4 @@ for f in $fslist; do mount --move $f $rodir/$f done -exec chroot $rodir /sbin/init +exec switch_root $rodir /sbin/init |