summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2018-07-25 11:11:12 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-07-30 12:44:35 +0100
commit119a860e0f9b7d1a5b061f8212c9c92b6a67814c (patch)
tree48bb6cde7574938d04094e939314e81ee01d31b3
parent06a8d8d615f5b2b563865ded31c78bff66556d09 (diff)
downloadpoky-119a860e0f9b7d1a5b061f8212c9c92b6a67814c.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. (From OE-Core rev: 531e363db08711b5390af16f5491ca8a71a0610c) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-core/update-rc.d/update-rc.d/add-verbose.patch49
-rw-r--r--meta/recipes-core/update-rc.d/update-rc.d/check-if-symlinks-are-valid.patch59
-rw-r--r--meta/recipes-core/update-rc.d/update-rc.d/fix-to-handle-priority-numbers-correctly.patch28
-rw-r--r--meta/recipes-core/update-rc.d/update-rc.d_0.8.bb (renamed from meta/recipes-core/update-rc.d/update-rc.d_0.7.bb)11
4 files changed, 2 insertions, 145 deletions
diff --git a/meta/recipes-core/update-rc.d/update-rc.d/add-verbose.patch b/meta/recipes-core/update-rc.d/update-rc.d/add-verbose.patch
deleted file mode 100644
index fb443ff15e..0000000000
--- a/meta/recipes-core/update-rc.d/update-rc.d/add-verbose.patch
+++ /dev/null
@@ -1,49 +0,0 @@
1Upstream-Status: Pending
2
3--- update-rc.d/update-rc.d.org 2005-01-03 00:30:47.000000000 +0200
4+++ update-rc.d/update-rc.d 2007-12-01 19:41:08.000000000 +0200
5@@ -19,6 +19,7 @@
6 notreally=0
7 force=0
8 dostart=0
9+verbose=0
10
11 usage()
12 {
13@@ -28,6 +29,7 @@
14 update-rc.d [-n] [-r <root>] [-s] <basename> start|stop NN runlvl [runlvl] [...] .
15 -n: not really
16 -f: force
17+ -v: verbose
18 -r: alternate root path (default is /)
19 -s: invoke start methods if appropriate to current runlevel
20 EOF
21@@ -69,7 +71,7 @@
22 lev=`echo $2 | cut -d/ -f1`
23 nn=`echo $2 | cut -d/ -f2`
24 fn="${etcd}${lev}.d/${startstop}${nn}${bn}"
25- echo " $fn -> ../init.d/$bn"
26+ [ $verbose -eq 1 ] && echo " $fn -> ../init.d/$bn"
27 if [ $notreally -eq 0 ]; then
28 mkdir -p `dirname $fn`
29 ln -s ../init.d/$bn $fn
30@@ -89,7 +91,7 @@
31 exit 0
32 fi
33
34- echo " Adding system startup for $initd/$bn ..."
35+ echo " Adding system startup for $initd/$bn."
36
37 for i in $startlinks; do
38 dolink S $i
39@@ -105,6 +107,10 @@
40 shift
41 continue
42 ;;
43+ -v) verbose=1
44+ shift
45+ continue
46+ ;;
47 -f) force=1
48 shift
49 continue
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 @@
1Check if symlinks are valid
2
3When using root option and $initd/$bn is a symlink, the script would fail because
4the symlink points to a path on target. For example:
5
6/path/to/target/rootfs/etc/init.d/syslog -> /etc/init.d/syslog.busybox
7
8Hence, [ -f /path/to/target/rootfs/etc/init.d/syslog ] condition would return
9false.
10
11This patch adds the posibility to check whether the file the symlink points to
12actually exists in rootfs path and then continue.
13
14Upstream-Status: Pending
15
16Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
17Signed-off-by: Christopher Larson <chris_larson@mentor.com>
18
19Index: git/update-rc.d
20===================================================================
21--- git.orig/update-rc.d
22+++ git/update-rc.d
23@@ -147,13 +147,34 @@ fi
24 bn=$1
25 shift
26
27+sn=$initd/$bn
28+if [ -L "$sn" -a -n "$root" ]; then
29+ if which readlink >/dev/null; then
30+ while true; do
31+ linksn="$(readlink "$sn")"
32+ if [ -z "$linksn" ]; then
33+ break
34+ fi
35+
36+ sn="$linksn"
37+ case "$sn" in
38+ /*) sn="$root$sn" ;;
39+ *) sn="$initd/$sn" ;;
40+ esac
41+ done
42+ else
43+ echo "update-rc.d: readlink tool not present, cannot check whether \
44+ $sn symlink points to a valid file." >&2
45+ fi
46+fi
47+
48 if [ $1 != "remove" ]; then
49- if [ ! -f "$initd/$bn" ]; then
50+ if [ ! -f "$sn" ]; then
51 echo "update-rc.d: $initd/$bn: file does not exist" >&2
52 exit 1
53 fi
54 else
55- if [ -f "$initd/$bn" ]; then
56+ if [ -f "$sn" ]; then
57 if [ $force -eq 1 ]; then
58 echo "update-rc.d: $initd/$bn exists during rc.d purge (continuing)" >&2
59 else
diff --git a/meta/recipes-core/update-rc.d/update-rc.d/fix-to-handle-priority-numbers-correctly.patch b/meta/recipes-core/update-rc.d/update-rc.d/fix-to-handle-priority-numbers-correctly.patch
deleted file mode 100644
index 85bc234a27..0000000000
--- a/meta/recipes-core/update-rc.d/update-rc.d/fix-to-handle-priority-numbers-correctly.patch
+++ /dev/null
@@ -1,28 +0,0 @@
1Upstream-Status: Pending
2
3Fix to handle priority numbers correctly.
4Previously, if the priority number is '08' or '09', for example,
5the script cannot handle them correctly as these numbers are treated
6as octal numbers.
7
8Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
9---
10 update-rc.d | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-)
12
13diff --git a/update-rc.d b/update-rc.d
14index ec50d15..c70b859 100644
15--- a/update-rc.d
16+++ b/update-rc.d
17@@ -205,7 +205,7 @@ case $1 in
18 exit 1
19 fi
20 shift
21- NN=`printf %02d $1`
22+ NN=`printf %02d $(expr $1 + 0)`
23 shift
24 while [ "x$1" != "x." ]; do
25 if [ $# -eq 0 ]; then
26--
271.7.9.5
28
diff --git a/meta/recipes-core/update-rc.d/update-rc.d_0.7.bb b/meta/recipes-core/update-rc.d/update-rc.d_0.8.bb
index d3d3e2f237..baa21aeae1 100644
--- a/meta/recipes-core/update-rc.d/update-rc.d_0.7.bb
+++ b/meta/recipes-core/update-rc.d/update-rc.d_0.8.bb
@@ -6,16 +6,9 @@ SECTION = "base"
6LICENSE = "GPLv2+" 6LICENSE = "GPLv2+"
7LIC_FILES_CHKSUM = "file://update-rc.d;beginline=5;endline=15;md5=148a48321b10eb37c1fa3ee02b940a75" 7LIC_FILES_CHKSUM = "file://update-rc.d;beginline=5;endline=15;md5=148a48321b10eb37c1fa3ee02b940a75"
8 8
9PR = "r5" 9SRC_URI = "git://git.yoctoproject.org/update-rc.d"
10SRCREV = "22e0692898c3e7ceedc8eb5ff4ec8e0b9c340b2d"
10 11
11# Revision corresponding to tag update-rc.d_0.7
12SRCREV = "eca680ddf28d024954895f59a241a622dd575c11"
13
14SRC_URI = "git://github.com/philb/update-rc.d.git \
15 file://add-verbose.patch \
16 file://check-if-symlinks-are-valid.patch \
17 file://fix-to-handle-priority-numbers-correctly.patch \
18 "
19UPSTREAM_CHECK_COMMITS = "1" 12UPSTREAM_CHECK_COMMITS = "1"
20 13
21S = "${WORKDIR}/git" 14S = "${WORKDIR}/git"