update-rc.d: allow links target to be symlinks itself
PATCH 1/1 update-rc.d: allow links target to be symlinks itself
Needed to be able to combine update-rc.d with update-alternatives.
Signed-off-by Steffen Sledz <[email protected]>
--- recipes/update-rc.d/files/symlink.patch | 18 ++++++++++++++++++ recipes/update-rc.d/update-rc.d_0.7.bb | 5 +++-- 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 recipes/update-rc.d/files/symlink.patch
recipes/update-rc.d/files/symlink.patch new file +18 -0
@@ -0,0 +1,18 @@ +diff -Nurd update-rc.d.orig//update-rc.d update-rc.d/update-rc.d +--- update-rc.d.orig//update-rc.d 2010-05-11 15:22:22.000000000 +0200 ++++ update-rc.d/update-rc.d 2010-05-11 15:24:14.000000000 +0200 +@@ -148,12 +148,12 @@ + shift + + if [ $1 != "remove" ]; then +- if [ ! -f "$initd/$bn" ]; then ++ if [ ! ( -f "$initd/$bn" -o -L "$initd/$bn" ) ]; then + echo "update-rc.d: $initd/$bn: file does not exist" >&2 + exit 1 + fi + else +- if [ -f "$initd/$bn" ]; then ++ if [ -f "$initd/$bn" -o -L "$initd/$bn" ]; then + if [ $force -eq 1 ]; then + echo "update-rc.d: $initd/$bn exists during rc.d purge (continuing)" >&2 + else
recipes/update-rc.d/update-rc.d_0.7.bb +3 -2
@@ -4,12 +4,13 @@ DESCRIPTION = "Manage symlinks in /etc/rcN.d" LICENSE = "GPL" S = "${WORKDIR}/update-rc.d" INHIBIT_DEFAULT_DEPS = "1" -PR = "r1" +PR = "r2" BBCLASSEXTEND = "native" SRC_URI = "${HANDHELDS_CVS};module=apps/update-rc.d;tag=r0_7 \ - file://add-verbose.patch;patch=1" + file://add-verbose.patch;patch=1 \ + file://symlink.patch;patch=1" PACKAGE_ARCH = "all"
Signature · 1 line
1.6.4.2
PATCH v2 1/1 update-rc.d: allow link targets to be symlinks itself
Needed to be able to combine update-rc.d with update-alternatives.
Signed-off-by Steffen Sledz <[email protected]>
--- recipes/update-rc.d/files/symlink.patch | 18 ++++++++++++++++++ recipes/update-rc.d/update-rc.d_0.7.bb | 5 +++-- 2 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 recipes/update-rc.d/files/symlink.patch
recipes/update-rc.d/files/symlink.patch new file +18 -0
@@ -0,0 +1,18 @@ +diff -Nurd update-rc.d.orig//update-rc.d update-rc.d/update-rc.d +--- update-rc.d.orig//update-rc.d 2010-05-11 15:22:22.000000000 +0200 ++++ update-rc.d/update-rc.d 2010-05-11 15:24:14.000000000 +0200 +@@ -148,12 +148,12 @@ + shift + + if [ $1 != "remove" ]; then +- if [ ! -f "$initd/$bn" ]; then ++ if [ ! \( -f "$initd/$bn" -o -L "$initd/$bn" \) ]; then + echo "update-rc.d: $initd/$bn: file does not exist" >&2 + exit 1 + fi + else +- if [ -f "$initd/$bn" ]; then ++ if [ -f "$initd/$bn" -o -L "$initd/$bn" ]; then + if [ $force -eq 1 ]; then + echo "update-rc.d: $initd/$bn exists during rc.d purge (continuing)" >&2 + else
recipes/update-rc.d/update-rc.d_0.7.bb +3 -2
@@ -4,12 +4,13 @@ DESCRIPTION = "Manage symlinks in /etc/rcN.d" LICENSE = "GPL" S = "${WORKDIR}/update-rc.d" INHIBIT_DEFAULT_DEPS = "1" -PR = "r1" +PR = "r2" BBCLASSEXTEND = "native" SRC_URI = "${HANDHELDS_CVS};module=apps/update-rc.d;tag=r0_7 \ - file://add-verbose.patch;patch=1" + file://add-verbose.patch;patch=1 \ + file://symlink.patch;patch=1" PACKAGE_ARCH = "all"
Signature · 1 line
1.6.4.2
Re: [PATCH v2] update-rc.d: allow link targets to be symlinks itself
Forget this patch (at least for a while). May be it is not really needed.
Sorry for the annoyance.
Regards,
Steffen