summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/update-rc.d
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/update-rc.d')
-rw-r--r--meta/recipes-core/update-rc.d/update-rc.d/check-if-symlinks-are-valid.patch26
1 files changed, 16 insertions, 10 deletions
diff --git a/meta/recipes-core/update-rc.d/update-rc.d/check-if-symlinks-are-valid.patch b/meta/recipes-core/update-rc.d/update-rc.d/check-if-symlinks-are-valid.patch
index 6f402ddb6d..075171a5a3 100644
--- a/meta/recipes-core/update-rc.d/update-rc.d/check-if-symlinks-are-valid.patch
+++ b/meta/recipes-core/update-rc.d/update-rc.d/check-if-symlinks-are-valid.patch
@@ -14,25 +14,31 @@ actually exists in rootfs path and then continue.
14Upstream-Status: Pending 14Upstream-Status: Pending
15 15
16Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> 16Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
17Signed-off-by: Christopher Larson <chris_larson@mentor.com>
17 18
18Index: git/update-rc.d 19Index: git/update-rc.d
19=================================================================== 20===================================================================
20--- git.orig/update-rc.d 2013-01-16 12:12:58.349814356 +0200 21--- git.orig/update-rc.d
21+++ git/update-rc.d 2013-01-16 13:02:42.490864939 +0200 22+++ git/update-rc.d
22@@ -147,13 +147,29 @@ 23@@ -147,13 +147,34 @@ fi
23 bn=$1 24 bn=$1
24 shift 25 shift
25 26
26+sn=$initd/$bn 27+sn=$initd/$bn
27+if [ -L "$sn" -a -n "$root" ]; then 28+if [ -L "$sn" -a -n "$root" ]; then
28+ readlink=$(which readlink) 29+ if which readlink >/dev/null; then
30+ while true; do
31+ linksn="$(readlink "$sn")"
32+ if [ -z "$linksn" ]; then
33+ break
34+ fi
29+ 35+
30+ if [ -n "$readlink" ]; then 36+ sn="$linksn"
31+ sn=$($readlink "$sn") 37+ case "$sn" in
32+ case "$sn" in 38+ /*) sn="$root$sn" ;;
33+ /*) sn=${root}${sn} ;; 39+ *) sn="$initd/$sn" ;;
34+ *) sn=$initd/$sn ;; 40+ esac
35+ esac 41+ done
36+ else 42+ else
37+ echo "update-rc.d: readlink tool not present, cannot check whether \ 43+ echo "update-rc.d: readlink tool not present, cannot check whether \
38+ $sn symlink points to a valid file." >&2 44+ $sn symlink points to a valid file." >&2