post-umount: add dm-verity-inactivated.umount script 33/268133/1 accepted/tizen/6.5/unified/20211217.121953 submit/tizen_6.5/20211216.114102
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:37:03 +0000 (11:37 +0000)
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'