[oe] [PATCH] update-rc.d: allow links target to be symlinks itself
Steffen Sledz
sledz at dresearch.de
Tue May 11 13:46:42 UTC 2010
Needed to be able to combine update-rc.d with update-alternatives.
Signed-off-by: Steffen Sledz <sledz at dresearch.de>
---
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
diff --git a/recipes/update-rc.d/files/symlink.patch b/recipes/update-rc.d/files/symlink.patch
new file mode 100644
index 0000000..63f1239
--- /dev/null
+++ b/recipes/update-rc.d/files/symlink.patch
@@ -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
diff --git a/recipes/update-rc.d/update-rc.d_0.7.bb b/recipes/update-rc.d/update-rc.d_0.7.bb
index 3217dc1..794f6db 100644
--- a/recipes/update-rc.d/update-rc.d_0.7.bb
+++ b/recipes/update-rc.d/update-rc.d_0.7.bb
@@ -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"
--
1.6.4.2
More information about the Openembedded-devel
mailing list