Adding python glog (via pip install) to rootfs
Also, specifying full path to fdisk, since it's not necessarily in user's path
Change-Id: Ic7d6c30edaa4aa12f5d95dd84caa5e4ddce0be91
diff --git a/y2020/vision/rootfs/modify_rootfs.sh b/y2020/vision/rootfs/modify_rootfs.sh
index 8cec075..f08e635 100755
--- a/y2020/vision/rootfs/modify_rootfs.sh
+++ b/y2020/vision/rootfs/modify_rootfs.sh
@@ -23,7 +23,7 @@
then
echo "Already mounted"
else
- OFFSET="$(fdisk -lu "${IMAGE}" | grep "${IMAGE}1" | awk '{print 512*$2}')"
+ OFFSET="$(/sbin/fdisk -lu "${IMAGE}" | grep "${IMAGE}1" | awk '{print 512*$2}')"
sudo mount -o loop,offset=${OFFSET} "${IMAGE}" "${BOOT_PARTITION}"
fi
@@ -42,14 +42,14 @@
then
echo "Already mounted"
else
- OFFSET="$(fdisk -lu "${IMAGE}" | grep "${IMAGE}2" | awk '{print 512*$2}')"
+ OFFSET="$(/sbin/fdisk -lu "${IMAGE}" | grep "${IMAGE}2" | awk '{print 512*$2}')"
if [[ "$(stat -c %s "${IMAGE}")" < 3000000000 ]]; then
echo "Growing image"
dd if=/dev/zero bs=1G count=1 >> "${IMAGE}"
- START="$(fdisk -lu "${IMAGE}" | grep "${IMAGE}2" | awk '{print $2}')"
+ START="$(/sbin/fdisk -lu "${IMAGE}" | grep "${IMAGE}2" | awk '{print $2}')"
- sed -e 's/\s*\([\+0-9a-zA-Z]*\).*/\1/' << EOF | fdisk "${IMAGE}"
+ sed -e 's/\s*\([\+0-9a-zA-Z]*\).*/\1/' << EOF | /sbin/fdisk "${IMAGE}"
d # remove old partition
2
n # new partition