summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2014-05-29 09:50:53 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-06-01 14:29:30 +0100
commit4562f06975f118bf7779313ba2d7fc8cd7f8e8e2 (patch)
tree145818f19832c39678570cdfe929f2478c99b9db
parent80aece01294803e643fb4853e7d292ec21095aca (diff)
downloadpoky-4562f06975f118bf7779313ba2d7fc8cd7f8e8e2.tar.gz
update-rc.d: fix to handle priority numbers correctly
The update-rc.d treated priority numbers begin with '0' as octal numbers. This led to problems of update-rc.d being unable to handle priorities like '08' or '09' correctly. This patch fixes the above problem. [YOCTO #6376] (From OE-Core rev: 675fd834b9ed696cd87809830d57d3da083580d3) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-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.7.bb1
2 files changed, 29 insertions, 0 deletions
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
new file mode 100644
index 0000000000..85bc234a27
--- /dev/null
+++ b/meta/recipes-core/update-rc.d/update-rc.d/fix-to-handle-priority-numbers-correctly.patch
@@ -0,0 +1,28 @@
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.7.bb
index 50dcaa2d3f..c15cb78033 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.7.bb
@@ -13,6 +13,7 @@ SRCREV = "eca680ddf28d024954895f59a241a622dd575c11"
13SRC_URI = "git://github.com/philb/update-rc.d.git \ 13SRC_URI = "git://github.com/philb/update-rc.d.git \
14 file://add-verbose.patch \ 14 file://add-verbose.patch \
15 file://check-if-symlinks-are-valid.patch \ 15 file://check-if-symlinks-are-valid.patch \
16 file://fix-to-handle-priority-numbers-correctly.patch \
16 " 17 "
17 18
18S = "${WORKDIR}/git" 19S = "${WORKDIR}/git"