initrd: fix hal mountpoint in init wrapper environment 55/259855/4 submit/tizen/20210622.062058
authorINSUN PYO <insun.pyo@samsung.com>
Wed, 16 Jun 2021 03:13:11 +0000 (12:13 +0900)
committerINSUN PYO <insun.pyo@samsung.com>
Thu, 17 Jun 2021 09:35:47 +0000 (09:35 +0000)
Change-Id: Id374e7987895723e6e16da3080757ce1bbc9d3d7

scripts/init.sh

index 82fc1782bc465d4c0d33554756d4045b4cab1af2..65470fdda3b26c2246d5976538362d46f77234b7 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+!/bin/sh
 PATH=/bin:/usr/bin:/sbin:/usr/sbin
 
 HALFS=
@@ -7,6 +7,7 @@ DATAFS=
 USERFS=
 MODULES=
 
+HALFS_MNT=
 ROOTFS_MNT=
 DATAFS_MNT=
 MODULES_MNT=
@@ -58,6 +59,7 @@ function check_flags()
         IN_INITRD=0
         ROOTFS_MNT="/"
     fi
+    HALFS_MNT=${ROOTFS_MNT}/hal
     DATAFS_MNT=${ROOTFS_MNT}/opt
     MODULES_MNT=${ROOTFS_MNT}/lib/modules
 
@@ -232,7 +234,7 @@ function process_halfs()
 
     #Workaround code to check whether /hal/lib directory is existed#
     #In future, it will be removed#
-    if [ -d $ROOTFS_MNT/hal/lib ]; then return; fi
+    if [ -d $HALFS_MNT/lib ]; then return; fi
 
     if [ "$NEED_RESIZEFS" = "1" ]
     then
@@ -240,7 +242,7 @@ function process_halfs()
         /sbin/resize2fs -f $HALFS
     fi
     /sbin/fsck -y $HALFS
-    /bin/mount $HALFS /sysroot/hal -o ro
+    /bin/mount -o ro $HALFS $HALFS_MNT
 }
 
 function write_resized_flag()