[5/6] initscripts: let populate-volatile.sh create the /tmp link

Submitted by Qi.Chen@windriver.com on Jan. 28, 2013, 9:05 a.m. | Patch ID: 43497


Message ID 3985e114e55a884807123a85e44ffd962b6915ba.1359362547.git.Qi.Chen@windriver.com
State New
Headers show

Commit Message

Qi.Chen@windriver.com Jan. 28, 2013, 9:05 a.m.
From: Chen Qi <Qi.Chen@windriver.com>

Previously, the /tmp link (/tmp -> /var/tmp) was created by the
bootmisc.sh script. So in case of a read-only rootfs, this symlink
would not be created correctly.

The populate-volatile.sh script is intended to handle all directories
and files related to volatile storage, so we should let it create
the /tmp link.

In addition, because of the improments of populate-volatile.sh, the data
loss problem of bug#3404 is also resolved by this patch.

[YOCTO #3406]
[YOCTO #3404]

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
 .../initscripts/initscripts-1.0/bootmisc.sh        |    9 +--------
 .../initscripts/initscripts-1.0/volatiles          |    1 +
 2 files changed, 2 insertions(+), 8 deletions(-)

Patch hide | download patch | download mbox

diff --git a/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh b/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh
index 4f76cb4..3b5a47f 100755
--- a/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh
+++ b/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh
@@ -54,14 +54,7 @@  fi
 # This is as good a place as any for a sanity check
-# /tmp should be a symlink to /var/tmp to cut down on the number
-# of mounted ramdisks.
-if test ! -L /tmp && test -d /var/tmp
-	rm -rf /tmp
-	ln -sf /var/tmp /tmp
 # Set the system clock from hardware clock
 # If the timestamp is more recent than the current time,
 # use the timestamp instead.
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/volatiles b/meta/recipes-core/initscripts/initscripts-1.0/volatiles
index e0741aa..f7e2ef7 100644
--- a/meta/recipes-core/initscripts/initscripts-1.0/volatiles
+++ b/meta/recipes-core/initscripts/initscripts-1.0/volatiles
@@ -31,6 +31,7 @@  l root root 1777 /var/lock /var/volatile/lock
 l root root 0755 /var/log /var/volatile/log
 l root root 0755 /var/run /var/volatile/run
 l root root 1777 /var/tmp /var/volatile/tmp
+l root root 1777 /tmp /var/tmp
 d root root 0755 /var/lock/subsys none
 f root root 0664 /var/log/wtmp none
 f root root 0664 /var/run/utmp none