From 30e3bbcf922137e2f8f40be2a34a25bc49b8e410 Mon Sep 17 00:00:00 2001 From: Suchang Woo Date: Mon, 11 May 2015 19:36:22 +0900 Subject: [PATCH] Add scritps/mobile-mbr-3parts.post /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 Change-Id: I95571c1b284683e80fd4922e286fe0924b2b8607 --- mobile.yaml | 4 ++++ scripts/mobile-mbr-3parts.post | 22 ++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 scripts/mobile-mbr-3parts.post diff --git a/mobile.yaml b/mobile.yaml index bc4cc15..7c3ed4e 100644 --- a/mobile.yaml +++ b/mobile.yaml @@ -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 index 0000000..db2b792 --- /dev/null +++ b/scripts/mobile-mbr-3parts.post @@ -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. +# +# +/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 + -- 2.7.4