Merge pull request #15 from puppetmaster/fix-growrootfs

Fix growpart error when missing.
pull/20/head
Javi Fontan 9 years ago
commit 930f49dfd9

@ -1,5 +1,10 @@
#!/bin/bash
GROWPART=$(which growpart)
if [[ ${?} -ne 0 ]]
then
echo "Skipping growfs, growpart command is missing"
else
MOUNT_LINE=$(cat /etc/mtab | grep ' / ' | grep -v '^rootfs')
DEVICE=$(echo "$MOUNT_LINE" | cut -d' ' -f1)
@ -26,4 +31,4 @@ xfs)
xfs_growfs /
;;
esac
fi

Loading…
Cancel
Save