mirror of
https://git.yoctoproject.org/poky
synced 2026-06-03 01:40:07 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
06a8d8d615
commit
119a860e0f
@@ -1,49 +0,0 @@
|
||||
Upstream-Status: Pending
|
||||
|
||||
--- update-rc.d/update-rc.d.org 2005-01-03 00:30:47.000000000 +0200
|
||||
+++ update-rc.d/update-rc.d 2007-12-01 19:41:08.000000000 +0200
|
||||
@@ -19,6 +19,7 @@
|
||||
notreally=0
|
||||
force=0
|
||||
dostart=0
|
||||
+verbose=0
|
||||
|
||||
usage()
|
||||
{
|
||||
@@ -28,6 +29,7 @@
|
||||
update-rc.d [-n] [-r <root>] [-s] <basename> start|stop NN runlvl [runlvl] [...] .
|
||||
-n: not really
|
||||
-f: force
|
||||
+ -v: verbose
|
||||
-r: alternate root path (default is /)
|
||||
-s: invoke start methods if appropriate to current runlevel
|
||||
EOF
|
||||
@@ -69,7 +71,7 @@
|
||||
lev=`echo $2 | cut -d/ -f1`
|
||||
nn=`echo $2 | cut -d/ -f2`
|
||||
fn="${etcd}${lev}.d/${startstop}${nn}${bn}"
|
||||
- echo " $fn -> ../init.d/$bn"
|
||||
+ [ $verbose -eq 1 ] && echo " $fn -> ../init.d/$bn"
|
||||
if [ $notreally -eq 0 ]; then
|
||||
mkdir -p `dirname $fn`
|
||||
ln -s ../init.d/$bn $fn
|
||||
@@ -89,7 +91,7 @@
|
||||
exit 0
|
||||
fi
|
||||
|
||||
- echo " Adding system startup for $initd/$bn ..."
|
||||
+ echo " Adding system startup for $initd/$bn."
|
||||
|
||||
for i in $startlinks; do
|
||||
dolink S $i
|
||||
@@ -105,6 +107,10 @@
|
||||
shift
|
||||
continue
|
||||
;;
|
||||
+ -v) verbose=1
|
||||
+ shift
|
||||
+ continue
|
||||
+ ;;
|
||||
-f) force=1
|
||||
shift
|
||||
continue
|
||||
@@ -1,59 +0,0 @@
|
||||
Check if symlinks are valid
|
||||
|
||||
When using root option and $initd/$bn is a symlink, the script would fail because
|
||||
the symlink points to a path on target. For example:
|
||||
|
||||
/path/to/target/rootfs/etc/init.d/syslog -> /etc/init.d/syslog.busybox
|
||||
|
||||
Hence, [ -f /path/to/target/rootfs/etc/init.d/syslog ] condition would return
|
||||
false.
|
||||
|
||||
This patch adds the posibility to check whether the file the symlink points to
|
||||
actually exists in rootfs path and then continue.
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
|
||||
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
|
||||
|
||||
Index: git/update-rc.d
|
||||
===================================================================
|
||||
--- git.orig/update-rc.d
|
||||
+++ git/update-rc.d
|
||||
@@ -147,13 +147,34 @@ fi
|
||||
bn=$1
|
||||
shift
|
||||
|
||||
+sn=$initd/$bn
|
||||
+if [ -L "$sn" -a -n "$root" ]; then
|
||||
+ if which readlink >/dev/null; then
|
||||
+ while true; do
|
||||
+ linksn="$(readlink "$sn")"
|
||||
+ if [ -z "$linksn" ]; then
|
||||
+ break
|
||||
+ fi
|
||||
+
|
||||
+ sn="$linksn"
|
||||
+ case "$sn" in
|
||||
+ /*) sn="$root$sn" ;;
|
||||
+ *) sn="$initd/$sn" ;;
|
||||
+ esac
|
||||
+ done
|
||||
+ else
|
||||
+ echo "update-rc.d: readlink tool not present, cannot check whether \
|
||||
+ $sn symlink points to a valid file." >&2
|
||||
+ fi
|
||||
+fi
|
||||
+
|
||||
if [ $1 != "remove" ]; then
|
||||
- if [ ! -f "$initd/$bn" ]; then
|
||||
+ if [ ! -f "$sn" ]; then
|
||||
echo "update-rc.d: $initd/$bn: file does not exist" >&2
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
- if [ -f "$initd/$bn" ]; then
|
||||
+ if [ -f "$sn" ]; then
|
||||
if [ $force -eq 1 ]; then
|
||||
echo "update-rc.d: $initd/$bn exists during rc.d purge (continuing)" >&2
|
||||
else
|
||||
-28
@@ -1,28 +0,0 @@
|
||||
Upstream-Status: Pending
|
||||
|
||||
Fix to handle priority numbers correctly.
|
||||
Previously, if the priority number is '08' or '09', for example,
|
||||
the script cannot handle them correctly as these numbers are treated
|
||||
as octal numbers.
|
||||
|
||||
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
|
||||
---
|
||||
update-rc.d | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/update-rc.d b/update-rc.d
|
||||
index ec50d15..c70b859 100644
|
||||
--- a/update-rc.d
|
||||
+++ b/update-rc.d
|
||||
@@ -205,7 +205,7 @@ case $1 in
|
||||
exit 1
|
||||
fi
|
||||
shift
|
||||
- NN=`printf %02d $1`
|
||||
+ NN=`printf %02d $(expr $1 + 0)`
|
||||
shift
|
||||
while [ "x$1" != "x." ]; do
|
||||
if [ $# -eq 0 ]; then
|
||||
--
|
||||
1.7.9.5
|
||||
|
||||
+2
-9
@@ -6,16 +6,9 @@ SECTION = "base"
|
||||
LICENSE = "GPLv2+"
|
||||
LIC_FILES_CHKSUM = "file://update-rc.d;beginline=5;endline=15;md5=148a48321b10eb37c1fa3ee02b940a75"
|
||||
|
||||
PR = "r5"
|
||||
SRC_URI = "git://git.yoctoproject.org/update-rc.d"
|
||||
SRCREV = "22e0692898c3e7ceedc8eb5ff4ec8e0b9c340b2d"
|
||||
|
||||
# Revision corresponding to tag update-rc.d_0.7
|
||||
SRCREV = "eca680ddf28d024954895f59a241a622dd575c11"
|
||||
|
||||
SRC_URI = "git://github.com/philb/update-rc.d.git \
|
||||
file://add-verbose.patch \
|
||||
file://check-if-symlinks-are-valid.patch \
|
||||
file://fix-to-handle-priority-numbers-correctly.patch \
|
||||
"
|
||||
UPSTREAM_CHECK_COMMITS = "1"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
Reference in New Issue
Block a user