init.wrapper: Adding to mount /usr/lib/modules. 27/123827/1 accepted/tizen/unified/20170410.155513 submit/tizen/20170409.222041
authorwchang kim <wchang.kim@samsung.com>
Fri, 7 Apr 2017 07:05:08 +0000 (16:05 +0900)
committerwchang kim <wchang.kim@samsung.com>
Fri, 7 Apr 2017 07:05:08 +0000 (16:05 +0900)
Change-Id: I60244ffcabe7c424799e0b919936b7f89fa91f6a

scripts/init.wrapper

index 56aef97..082be47 100644 (file)
@@ -4,6 +4,7 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin
 
 SYSTEM_MNT=/opt
 SYS_BLK_DIR=/sys/class/block
+MODULES_MNT=/usr/lib/modules
 
 mount -o nosuid,strictatime,mode=755 -t devtmpfs devtmpfs /dev
 mount -o nosuid,noexec,nodev -t sysfs sysfs /sys
@@ -16,6 +17,12 @@ then
     ROOTFS=`/sbin/blkid -t PARTLABEL=rootfs -o device`
 fi
 
+MODULES=`/sbin/blkid -L modules`
+if [ x$MODULES = "x" ]
+then
+    MODULES=`/sbin/blkid -t PARTLABEL=module -o device`
+fi
+
 DATAFS=`/sbin/blkid -L system-data`
 if [ x$DATAFS = "x" ]
 then
@@ -33,6 +40,14 @@ else
     /usr/bin/mount -o remount,ro $ROOTFS
 fi
 
+if [ x$MODULES = "x" ]
+    echo "Warning : There is no modules partition."
+then
+    /sbin/resize2fs -f $MODULES
+    /sbin/fsck -y $MODULES
+    /bin/mount $MODULES $MODULES_MNT
+fi
+
 if [ x$DATAFS = "x" ]
 then
     echo "Warning : There is no system-data partition."