Support container-based Tizen guest OS 84/260284/3 accepted/tizen/unified/20210702.133337 submit/tizen/20210702.050357
authorHyotaek Shim <hyotaek.shim@samsung.com>
Wed, 23 Jun 2021 06:45:00 +0000 (15:45 +0900)
committerHyotaek Shim <hyotaek.shim@samsung.com>
Fri, 2 Jul 2021 04:40:13 +0000 (04:40 +0000)
Change-Id: I704936b90a8b19c844851abbc9d17fd082402f6b
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
scripts/init.sh
scripts/verityctl

index cb63e4e2e0bd6765a8d593843439b50294e6f469..00fe8a58495133ba929fc050667025397de12172 100755 (executable)
@@ -23,18 +23,30 @@ function find_partitions()
     then
         ROOTFS=`/sbin/blkid -t PARTLABEL=rootfs -o device`
     fi
+    if [ x$ROOTFS = "x" ]
+    then
+        ROOTFS=`/sbin/blkid -t LABEL=contain-rootfs -o device`
+    fi
 
     DATAFS=`/sbin/blkid -L system-data`
     if [ x$DATAFS = "x" ]
     then
         DATAFS=`/sbin/blkid -t PARTLABEL=system-data -o device`
     fi
+    if [ x$DATAFS = "x" ]
+    then
+        DATAFS=`/sbin/blkid -t LABEL=contain-sysdata -o device`
+    fi
 
     USERFS=`/sbin/blkid -L user`
     if [ x$USERFS = "x" ]
     then
         USERFS=`/sbin/blkid -t PARTLABEL=user -o device`
     fi
+    if [ x$USERFS = "x" ]
+    then
+        USERFS=`/sbin/blkid -t LABEL=contain-user -o device`
+    fi
 
     MODULES=`/sbin/blkid -L modules`
     if [ x$MODULES = "x" ]
index cf7015ed5698d3213da28f91054acd0b3318ebeb..9012330d1893ece0828961454cd54ceba73216bf 100755 (executable)
@@ -197,6 +197,10 @@ get_mode()
        then
                ROOTFS=`/sbin/blkid -t PARTLABEL=rootfs -o device`
        fi
+       if [ -z "$ROOTFS" ]
+       then
+               ROOTFS=`/sbin/blkid -t LABEL=contain-rootfs -o device`
+       fi
 
        block_count=`/sbin/tune2fs -l $ROOTFS | grep "Block count" | gawk '{print $3}'`
        block_size=`/sbin/tune2fs -l $ROOTFS | grep "Block size" | gawk '{print $3}'`
@@ -246,6 +250,10 @@ disable()
        then
                ROOTFS=`/sbin/blkid -t PARTLABEL=rootfs -o device`
        fi
+       if [ -z "$ROOTFS" ]
+       then
+               ROOTFS=`/sbin/blkid -t LABEL=contain-rootfs -o device`
+       fi
 
        block_count=`/sbin/tune2fs -l $ROOTFS | grep "Block count" | gawk '{print $3}'`
        block_size=`/sbin/tune2fs -l $ROOTFS | grep "Block size" | gawk '{print $3}'`