From patchwork Sat Jan 19 22:47:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [08/10] base-files: add fstab for systemd based systems Date: Sat, 19 Jan 2013 22:47:11 -0000 From: Ross Burton X-Patchwork-Id: 42943 Message-Id: <6dc13da20db32190722df18348662e055c237a73.1358635193.git.ross.burton@intel.com> To: openembedded-core@lists.openembedded.org From: Martin Donnelly The default fstab has entries which are not necessary in systemd based systems so add a simpler default in this case. Signed-off-by: Martin Donnelly Signed-off-by: Radu Moisan Signed-off-by: Ross Burton --- meta/recipes-core/base-files/base-files/fstab.systemd | 9 +++++++++ meta/recipes-core/base-files/base-files_3.0.14.bb | 7 ++++++- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-core/base-files/base-files/fstab.systemd diff --git a/meta/recipes-core/base-files/base-files/fstab.systemd b/meta/recipes-core/base-files/base-files/fstab.systemd new file mode 100644 index 0000000..cb48a0d --- /dev/null +++ b/meta/recipes-core/base-files/base-files/fstab.systemd @@ -0,0 +1,9 @@ +# stock fstab - you probably want to override this with a machine specific one + +rootfs / auto defaults 1 1 +tmpfs /var/volatile tmpfs defaults 0 0 +tmpfs /media/ram tmpfs defaults 0 0 + +# uncomment this if your device has a SD/MMC/Transflash slot +#/dev/mmcblk0p1 /media/card auto defaults,sync,noauto 0 0 + diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb index 8ef7195..a90e995 100644 --- a/meta/recipes-core/base-files/base-files_3.0.14.bb +++ b/meta/recipes-core/base-files/base-files_3.0.14.bb @@ -18,6 +18,7 @@ SRC_URI = "file://rotation \ file://profile \ file://shells \ file://fstab \ + file://fstab.systemd \ file://filesystems \ file://issue.net \ file://issue \ @@ -91,7 +92,11 @@ do_install () { install -m 0644 ${WORKDIR}/rotation ${D}${sysconfdir}/rotation fi - install -m 0644 ${WORKDIR}/fstab ${D}${sysconfdir}/fstab + if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then + install -m 0644 ${WORKDIR}/fstab.systemd ${D}${sysconfdir}/fstab + else + install -m 0644 ${WORKDIR}/fstab ${D}${sysconfdir}/fstab + fi install -m 0644 ${WORKDIR}/filesystems ${D}${sysconfdir}/filesystems install -m 0644 ${WORKDIR}/usbd ${D}${sysconfdir}/default/usbd sed -i "s#ROOTHOME#${ROOT_HOME}#" ${WORKDIR}/profile