summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-core/base-files/base-files_3.0.14.bb24
1 files changed, 24 insertions, 0 deletions
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 f2d254e6bd..e16fe722b8 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
@@ -69,6 +69,29 @@ hostname = "${MACHINE}"
69 69
70BASEFILESISSUEINSTALL ?= "do_install_basefilesissue" 70BASEFILESISSUEINSTALL ?= "do_install_basefilesissue"
71 71
72# In previous versions of base-files, /run was a softlink to /var/run and the
73# directory was located in /var/volatlie/run. Also, /var/lock was a softlink
74# to /var/volatile/lock which is where the real directory was located. Now,
75# /run and /run/lock are the real directories. If we are upgrading, we may
76# need to remove the symbolic links first before we create the directories.
77# Otherwise the directory creation will fail and we will have circular symbolic
78# links.
79#
80pkg_preinst_${PN} () {
81 #!/bin/sh -e
82 if [ x"$D" = "x" ]; then
83 if [ -h "/var/lock" ]; then
84 # Remove the symbolic link
85 rm -f /var/lock
86 fi
87
88 if [ -h "/run" ]; then
89 # Remove the symbolic link
90 rm -f /run
91 fi
92 fi
93}
94
72do_install () { 95do_install () {
73 for d in ${dirs755}; do 96 for d in ${dirs755}; do
74 install -m 0755 -d ${D}$d 97 install -m 0755 -d ${D}$d
@@ -82,6 +105,7 @@ do_install () {
82 for d in ${volatiles}; do 105 for d in ${volatiles}; do
83 ln -sf volatile/$d ${D}${localstatedir}/$d 106 ln -sf volatile/$d ${D}${localstatedir}/$d
84 done 107 done
108
85 ln -snf ../run ${D}${localstatedir}/run 109 ln -snf ../run ${D}${localstatedir}/run
86 ln -snf ../run/lock ${D}${localstatedir}/lock 110 ln -snf ../run/lock ${D}${localstatedir}/lock
87 111