diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2013-01-24 15:28:45 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-02-06 09:37:27 +0000 |
commit | db5847dd411f12b8b96b9bee624e9be30b504653 (patch) | |
tree | 0b11adb6a47aa77682ed196061b52354057f3f20 | |
parent | f7bb0a97f843f22971740a99e041a4f4905d0e0d (diff) | |
download | poky-db5847dd411f12b8b96b9bee624e9be30b504653.tar.gz |
initscripts: let populate-volatile.sh create the /tmp link
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]
(From OE-Core rev: 12c4acd7ac5a27cf3676065b60f1c8395c96854c)
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-x | meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh | 9 | ||||
-rw-r--r-- | meta/recipes-core/initscripts/initscripts-1.0/volatiles | 1 |
2 files changed, 2 insertions, 8 deletions
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh b/meta/recipes-core/initscripts/initscripts-1.0/bootmisc.sh index 4f76cb4b28..3b5a47fcdd 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 | |||
54 | 54 | ||
55 | # | 55 | # |
56 | # This is as good a place as any for a sanity check | 56 | # This is as good a place as any for a sanity check |
57 | # /tmp should be a symlink to /var/tmp to cut down on the number | 57 | # |
58 | # of mounted ramdisks. | ||
59 | if test ! -L /tmp && test -d /var/tmp | ||
60 | then | ||
61 | rm -rf /tmp | ||
62 | ln -sf /var/tmp /tmp | ||
63 | fi | ||
64 | |||
65 | # Set the system clock from hardware clock | 58 | # Set the system clock from hardware clock |
66 | # If the timestamp is more recent than the current time, | 59 | # If the timestamp is more recent than the current time, |
67 | # use the timestamp instead. | 60 | # 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 e0741aad85..f7e2ef7aef 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 | |||
31 | l root root 0755 /var/log /var/volatile/log | 31 | l root root 0755 /var/log /var/volatile/log |
32 | l root root 0755 /var/run /var/volatile/run | 32 | l root root 0755 /var/run /var/volatile/run |
33 | l root root 1777 /var/tmp /var/volatile/tmp | 33 | l root root 1777 /var/tmp /var/volatile/tmp |
34 | l root root 1777 /tmp /var/tmp | ||
34 | d root root 0755 /var/lock/subsys none | 35 | d root root 0755 /var/lock/subsys none |
35 | f root root 0664 /var/log/wtmp none | 36 | f root root 0664 /var/log/wtmp none |
36 | f root root 0664 /var/run/utmp none | 37 | f root root 0664 /var/run/utmp none |