post-umount: add dm-verity-inactivated.umount script 87/268087/5
authorINSUN PYO <insun.pyo@samsung.com>
Thu, 16 Dec 2021 04:10:26 +0000 (13:10 +0900)
committerINSUN PYO <insun.pyo@samsung.com>
Thu, 16 Dec 2021 11:33:56 +0000 (20:33 +0900)
The purpose of this script is only checking dm-verity image creation.
dm-verity is not activated.

Change-Id: I359e5bf37552f40861a429eab3ba61a403326b6c

scripts/dm-verity-inactivated.umount [new file with mode: 0644]

diff --git a/scripts/dm-verity-inactivated.umount b/scripts/dm-verity-inactivated.umount
new file mode 100644 (file)
index 0000000..11c8a6b
--- /dev/null
@@ -0,0 +1,13 @@
+date +'[%m/%d %H:%M:%S %Z] dm-verity_only_image.umount umount post script - start'
+
+for IMG_PATH in $IMG_PATHS; do
+    if [ `basename $IMG_PATH` == "rootfs.img" ]; then
+        echo "Run verityctl format rootfs.img"
+        /usr/bin/verityctl format $IMG_PATH
+
+        echo "Disable dm-verity"
+        /usr/bin/sed -i 's/dm-verity0/dm-verity1/' $IMG_PATH
+    fi
+done
+
+date +'[%m/%d %H:%M:%S %Z] dm-verity_only_image.umount umount post script - end'