diff options
author | Ross Burton <ross.burton@intel.com> | 2018-07-25 11:11:12 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-07-30 12:44:28 +0100 |
commit | 531e363db08711b5390af16f5491ca8a71a0610c (patch) | |
tree | 4746f804c3e8bd502048097f8ce08ee5eb070be4 /meta/recipes-core/update-rc.d/update-rc.d/check-if-symlinks-are-valid.patch | |
parent | 29fc6fff32b05900526bf2426ba69a9a2d1f24f2 (diff) | |
download | openembedded-core-contrib-531e363db08711b5390af16f5491ca8a71a0610c.tar.gz |
update-rc.d: move to git.yoctoproject.org
The update-rc.d repository is now on git.yoctoproject.org, and has merged all of
the patches we were carrying.
Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-core/update-rc.d/update-rc.d/check-if-symlinks-are-valid.patch')
-rw-r--r-- | meta/recipes-core/update-rc.d/update-rc.d/check-if-symlinks-are-valid.patch | 59 |
1 files changed, 0 insertions, 59 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 deleted file mode 100644 index 075171a5a3..0000000000 --- a/meta/recipes-core/update-rc.d/update-rc.d/check-if-symlinks-are-valid.patch +++ /dev/null @@ -1,59 +0,0 @@ -Check if symlinks are valid - -When using root option and $initd/$bn is a symlink, the script would fail because -the symlink points to a path on target. For example: - -/path/to/target/rootfs/etc/init.d/syslog -> /etc/init.d/syslog.busybox - -Hence, [ -f /path/to/target/rootfs/etc/init.d/syslog ] condition would return -false. - -This patch adds the posibility to check whether the file the symlink points to -actually exists in rootfs path and then continue. - -Upstream-Status: Pending - -Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com> -Signed-off-by: Christopher Larson <chris_larson@mentor.com> - -Index: git/update-rc.d -=================================================================== ---- git.orig/update-rc.d -+++ git/update-rc.d -@@ -147,13 +147,34 @@ fi - bn=$1 - shift - -+sn=$initd/$bn -+if [ -L "$sn" -a -n "$root" ]; then -+ if which readlink >/dev/null; then -+ while true; do -+ linksn="$(readlink "$sn")" -+ if [ -z "$linksn" ]; then -+ break -+ fi -+ -+ sn="$linksn" -+ case "$sn" in -+ /*) sn="$root$sn" ;; -+ *) sn="$initd/$sn" ;; -+ esac -+ done -+ else -+ echo "update-rc.d: readlink tool not present, cannot check whether \ -+ $sn symlink points to a valid file." >&2 -+ fi -+fi -+ - if [ $1 != "remove" ]; then -- if [ ! -f "$initd/$bn" ]; then -+ if [ ! -f "$sn" ]; then - echo "update-rc.d: $initd/$bn: file does not exist" >&2 - exit 1 - fi - else -- if [ -f "$initd/$bn" ]; then -+ if [ -f "$sn" ]; then - if [ $force -eq 1 ]; then - echo "update-rc.d: $initd/$bn exists during rc.d purge (continuing)" >&2 - else |