From 5759b37a03130f8342291946861331b7c82e4de7 Mon Sep 17 00:00:00 2001 From: INSUN PYO Date: Thu, 16 Dec 2021 13:10:26 +0900 Subject: [PATCH] post-umount: add dm-verity-inactivated.umount script 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 | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 scripts/dm-verity-inactivated.umount diff --git a/scripts/dm-verity-inactivated.umount b/scripts/dm-verity-inactivated.umount new file mode 100644 index 0000000..11c8a6b --- /dev/null +++ b/scripts/dm-verity-inactivated.umount @@ -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' -- 2.7.4