Skip to content

Commit

Permalink
B OpenNebula#148: Use findmnt to find / device
Browse files Browse the repository at this point in the history
  • Loading branch information
xorel committed May 7, 2019
1 parent 76e7b55 commit a31d9f8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/etc/one-context.d/loc-05-grow-rootfs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ if [ $? -ne 0 ]; then
exit 1
fi

if [ $(grep mapper /etc/fstab |grep ' / ' |wc -l) -eq 0 ]; then
DEVICE=$(readlink -f "$DEVICE")
DISK=$(echo "$DEVICE" | sed 's/.$//')
if [ $(lvdisplay ${DEVICE} 2>/dev/null | wc -l) -eq 0 ]; then
DEVICE=$(findmnt -ln -o SOURCE /)
DISK=$(echo "$DEVICE" | sed 's/[0-9]*$//')
PARTITION=$(echo "$DEVICE" | sed "s|^$DISK||")
LVM="no"
fi
Expand Down

0 comments on commit a31d9f8

Please sign in to comment.