]> code.ossystems Code Review - openembedded-core.git/commitdiff
initscripts: let populate-volatile.sh create the /tmp link
authorChen Qi <Qi.Chen@windriver.com>
Thu, 24 Jan 2013 07:28:45 +0000 (15:28 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 6 Feb 2013 09:35:05 +0000 (09:35 +0000)
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>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh
meta/recipes-core/initscripts/initscripts-1.0/volatiles

index 4f76cb4b28816d1db26fac6066e3403af4c18325..3b5a47fcddad919b036eb1f591b9bcc733b870fd 100755 (executable)
@@ -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
-then
-       rm -rf /tmp
-       ln -sf /var/tmp /tmp
-fi
-
+#
 # Set the system clock from hardware clock
 # If the timestamp is more recent than the current time,
 # use the timestamp instead.
index e0741aad85c286013e580fd9943682ff3d66ad1b..f7e2ef7aef2885ce1c7c267a910ee914da0db249 100644 (file)
@@ -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