All of lore.kernel.org
 help / color / mirror / Atom feed
From: ChenQi <Qi.Chen@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH V2 6/6] initscripts: add read-only-rootfs-hook.sh script
Date: Tue, 29 Jan 2013 14:21:55 +0800	[thread overview]
Message-ID: <51076A83.2090102@windriver.com> (raw)
In-Reply-To: <eca94e550e201c8dba211c4a9a547761c9e7737f.1359433618.git.Qi.Chen@windriver.com>

V2 is a rebase against the latest master branch, which solves some 
conflicts in initscripts_1.0.bb file.

Because only this patch [6/6] had conflicts, I only sent out version 2 
of this patch.

Cheers,
Chen Qi

On 01/29/2013 02:17 PM, Qi.Chen@windriver.com wrote:
> From: Chen Qi <Qi.Chen@windriver.com>
>
> Add read-only-rootfs-hook.sh script to support a read-only rootfs.
> This script makes a union mount of /var/lib and /var/volatile/lib,
> making /var/lib directory writable.
>
> [YOCTO #3406]
>
> Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ---
>   .../initscripts-1.0/read-only-rootfs-hook.sh       |   19 +++++++++++++++++++
>   meta/recipes-core/initscripts/initscripts_1.0.bb   |    3 +++
>   2 files changed, 22 insertions(+)
>   create mode 100644 meta/recipes-core/initscripts/initscripts-1.0/read-only-rootfs-hook.sh
>
> diff --git a/meta/recipes-core/initscripts/initscripts-1.0/read-only-rootfs-hook.sh b/meta/recipes-core/initscripts/initscripts-1.0/read-only-rootfs-hook.sh
> new file mode 100644
> index 0000000..3a295ee
> --- /dev/null
> +++ b/meta/recipes-core/initscripts/initscripts-1.0/read-only-rootfs-hook.sh
> @@ -0,0 +1,19 @@
> +#!/bin/sh
> +
> +. /etc/default/rcS
> +
> +[ "$ROOTFS_READ_ONLY" = "no" ] && exit 0
> +
> +# Make sure unionfs is in /proc/filesystems
> +if ! grep -q unionfs /proc/filesystems; then
> +    echo "ERROR: unionfs not supported by kernel!"
> +    exit 1
> +fi
> +
> +mkdir -p /var/volatile/lib
> +mount -t unionfs -o dirs=/var/volatile/lib:/var/lib=ro none /var/lib
> +
> +if [ $? != 0 ]; then
> +    echo "ERROR: Union mount failed!"
> +    exit 1
> +fi
> diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb b/meta/recipes-core/initscripts/initscripts_1.0.bb
> index 69b9bfb..68f8034 100644
> --- a/meta/recipes-core/initscripts/initscripts_1.0.bb
> +++ b/meta/recipes-core/initscripts/initscripts_1.0.bb
> @@ -28,6 +28,7 @@ SRC_URI = "file://functions \
>              file://sysfs.sh \
>              file://device_table.txt \
>              file://populate-volatile.sh \
> +           file://read-only-rootfs-hook.sh \
>              file://volatiles \
>              file://save-rtc.sh \
>              file://GPLv2.patch"
> @@ -85,6 +86,7 @@ do_install () {
>   	install -m 0755    ${WORKDIR}/devpts		${D}${sysconfdir}/default
>   	install -m 0755    ${WORKDIR}/sysfs.sh		${D}${sysconfdir}/init.d
>   	install -m 0755    ${WORKDIR}/populate-volatile.sh ${D}${sysconfdir}/init.d
> +	install -m 0755    ${WORKDIR}/read-only-rootfs-hook.sh ${D}${sysconfdir}/init.d
>   	install -m 0755    ${WORKDIR}/save-rtc.sh	${D}${sysconfdir}/init.d
>   	install -m 0644    ${WORKDIR}/volatiles		${D}${sysconfdir}/default/volatiles/00_core
>   
> @@ -116,6 +118,7 @@ do_install () {
>   	update-rc.d -r ${D} bootmisc.sh start 55 S .
>   	update-rc.d -r ${D} sysfs.sh start 02 S .
>   	update-rc.d -r ${D} populate-volatile.sh start 37 S .
> +	update-rc.d -r ${D} read-only-rootfs-hook.sh start 41 S .
>   	update-rc.d -r ${D} devpts.sh start 38 S .
>   	if [ "${TARGET_ARCH}" = "arm" ]; then
>   	        update-rc.d -r ${D} alignment.sh start 06 S .




      reply	other threads:[~2013-01-29  6:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1359433618.git.Qi.Chen@windriver.com>
2013-01-29  6:17 ` [PATCH V2 6/6] initscripts: add read-only-rootfs-hook.sh script Qi.Chen
2013-01-29  6:21   ` ChenQi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51076A83.2090102@windriver.com \
    --to=qi.chen@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.