Add scritps/mobile-mbr-3parts.post 87/39187/1
authorSuchang Woo <suchang.woo@samsung.com>
Mon, 11 May 2015 10:36:22 +0000 (19:36 +0900)
committerSuchang Woo <suchang.woo@samsung.com>
Mon, 11 May 2015 11:00:16 +0000 (20:00 +0900)
/etc/fstab should be overwritten by mobile-mbr-3parts.post script
for the following reasons:
- To mount the other partitions except root in a mobile-mbr-3parts target
- To execute fsck automatically before mounting

Signed-off-by: Suchang Woo <suchang.woo@samsung.com>
Change-Id: I95571c1b284683e80fd4922e286fe0924b2b8607

mobile.yaml
scripts/mobile-mbr-3parts.post [new file with mode: 0644]

index bc4cc15..7c3ed4e 100644 (file)
@@ -86,6 +86,7 @@ X11:
         - generic-crosswalk
         - mobile-crosswalk
         - mobile-bluetooth
+        - mobile-mbr-3parts
     Repos: []
     NoChrootScripts:
         - buildname
@@ -135,6 +136,7 @@ X11-64:
         - generic-crosswalk
         - mobile-crosswalk
         - mobile-bluetooth
+        - mobile-mbr-3parts
     Repos: []
     NoChrootScripts:
         - buildname
@@ -183,6 +185,7 @@ Wayland:
         - generic-crosswalk
         - mobile-crosswalk
         - mobile-bluetooth
+        - mobile-mbr-3parts
     Repos: []
     NoChrootScripts:
         - buildname
@@ -231,6 +234,7 @@ Wayland-64:
         - generic-crosswalk
         - mobile-crosswalk
         - mobile-bluetooth
+        - mobile-mbr-3parts
     Repos: []
     NoChrootScripts:
         - buildname
diff --git a/scripts/mobile-mbr-3parts.post b/scripts/mobile-mbr-3parts.post
new file mode 100644 (file)
index 0000000..db2b792
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/sh
+echo "############### mobile-mbr-3parts.post ################"
+
+# overwrite /etc/fstab to execute fsck.
+#
+# The default value of the sixth field(fs_passno) in /etc/fstab
+# created by MIC tool is 0. If the value is 1 or 2, fsck will be executed
+# automatically before mounting. (refer to systemd-fstab-generator)
+cat > /etc/fstab << EOF
+# This file is generated by post script in .ks file.
+#
+# <file system> <mount point>   <type>  <options>        <dump> <pass>
+/dev/root       /               ext4    defaults,noatime 0      1
+devpts          /dev/pts        devpts  gid=5,mode=620   0      0
+tmpfs           /dev/shm        tmpfs   defaults         0      0
+proc            /proc           proc    defaults         0      0
+sysfs           /sys            sysfs   defaults         0      0
+
+LABEL=system-data /opt          ext4    defaults,noatime 0      2
+LABEL=user      /opt/usr        ext4    defaults,noatime 0      2
+EOF
+