All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] update-rc.d: allow links target to be symlinks itself
@ 2010-05-11 13:46 Steffen Sledz
  2010-05-12  7:31 ` [PATCH v2] update-rc.d: allow link targets " Steffen Sledz
  0 siblings, 1 reply; 3+ messages in thread
From: Steffen Sledz @ 2010-05-11 13:46 UTC (permalink / raw)
  To: openembedded-devel

Needed to be able to combine update-rc.d with update-alternatives.

Signed-off-by: Steffen Sledz <sledz@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




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH v2] update-rc.d: allow link targets to be symlinks itself
  2010-05-11 13:46 [PATCH] update-rc.d: allow links target to be symlinks itself Steffen Sledz
@ 2010-05-12  7:31 ` Steffen Sledz
  2010-05-12  8:43   ` Steffen Sledz
  0 siblings, 1 reply; 3+ messages in thread
From: Steffen Sledz @ 2010-05-12  7:31 UTC (permalink / raw)
  To: openembedded-devel

Needed to be able to combine update-rc.d with update-alternatives.

Signed-off-by: Steffen Sledz <sledz@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..06d62e6
--- /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




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] update-rc.d: allow link targets to be symlinks itself
  2010-05-12  7:31 ` [PATCH v2] update-rc.d: allow link targets " Steffen Sledz
@ 2010-05-12  8:43   ` Steffen Sledz
  0 siblings, 0 replies; 3+ messages in thread
From: Steffen Sledz @ 2010-05-12  8:43 UTC (permalink / raw)
  To: openembedded-devel

Forget this patch (at least for a while). May be it is not really needed.

Sorry for the annoyance.

Regards,
Steffen





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-05-12  8:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-11 13:46 [PATCH] update-rc.d: allow links target to be symlinks itself Steffen Sledz
2010-05-12  7:31 ` [PATCH v2] update-rc.d: allow link targets " Steffen Sledz
2010-05-12  8:43   ` Steffen Sledz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.