From e2e6f6fe07049f33cb6348780fa975162752e421 Mon Sep 17 00:00:00 2001 From: Adrian Dudau Date: Thu, 12 Dec 2013 13:38:32 +0100 Subject: initial commit of Enea Linux 3.1 Migrated from the internal git server on the dora-enea branch Signed-off-by: Adrian Dudau --- .../update-rc.d/update-rc.d/add-verbose.patch | 49 ++++++++++++++++++++ .../update-rc.d/check-if-symlinks-are-valid.patch | 53 ++++++++++++++++++++++ meta/recipes-core/update-rc.d/update-rc.d_0.7.bb | 30 ++++++++++++ 3 files changed, 132 insertions(+) create mode 100644 meta/recipes-core/update-rc.d/update-rc.d/add-verbose.patch create mode 100644 meta/recipes-core/update-rc.d/update-rc.d/check-if-symlinks-are-valid.patch create mode 100644 meta/recipes-core/update-rc.d/update-rc.d_0.7.bb (limited to 'meta/recipes-core/update-rc.d') 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 new file mode 100644 index 0000000000..fb443ff15e --- /dev/null +++ b/meta/recipes-core/update-rc.d/update-rc.d/add-verbose.patch @@ -0,0 +1,49 @@ +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 ] [-s] 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 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 new file mode 100644 index 0000000000..6f402ddb6d --- /dev/null +++ b/meta/recipes-core/update-rc.d/update-rc.d/check-if-symlinks-are-valid.patch @@ -0,0 +1,53 @@ +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 + +Index: git/update-rc.d +=================================================================== +--- git.orig/update-rc.d 2013-01-16 12:12:58.349814356 +0200 ++++ git/update-rc.d 2013-01-16 13:02:42.490864939 +0200 +@@ -147,13 +147,29 @@ + bn=$1 + shift + ++sn=$initd/$bn ++if [ -L "$sn" -a -n "$root" ]; then ++ readlink=$(which readlink) ++ ++ if [ -n "$readlink" ]; then ++ sn=$($readlink "$sn") ++ case "$sn" in ++ /*) sn=${root}${sn} ;; ++ *) sn=$initd/$sn ;; ++ esac ++ 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 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 new file mode 100644 index 0000000000..add8234aa4 --- /dev/null +++ b/meta/recipes-core/update-rc.d/update-rc.d_0.7.bb @@ -0,0 +1,30 @@ +SUMMARY = "manage symlinks in /etc/rcN.d." +DESCRIPTION = "update-rc.d is a utilities that allows the management of symlinks to the initscripts in the /etc/rcN.d directory structure." +SECTION = "base" + +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://update-rc.d;beginline=5;endline=15;md5=148a48321b10eb37c1fa3ee02b940a75" + +PR = "r5" + +# 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 \ + " + +S = "${WORKDIR}/git" + +inherit allarch + +do_compile() { +} + +do_install() { + install -d ${D}${sbindir} + install -m 0755 ${S}/update-rc.d ${D}${sbindir}/update-rc.d +} + +BBCLASSEXTEND = "native" -- cgit v1.2.3-54-g00ecf