summaryrefslogtreecommitdiffstats
path: root/poky/meta/recipes-extended/lsb/lsb
diff options
context:
space:
mode:
Diffstat (limited to 'poky/meta/recipes-extended/lsb/lsb')
-rw-r--r--poky/meta/recipes-extended/lsb/lsb/0001-fix-lsb_release-to-work-with-busybox-head-and-find.patch38
-rwxr-xr-xpoky/meta/recipes-extended/lsb/lsb/init-functions44
-rwxr-xr-xpoky/meta/recipes-extended/lsb/lsb/lsb_killproc6
-rwxr-xr-xpoky/meta/recipes-extended/lsb/lsb/lsb_log_message27
-rwxr-xr-xpoky/meta/recipes-extended/lsb/lsb/lsb_pidofproc6
-rwxr-xr-xpoky/meta/recipes-extended/lsb/lsb/lsb_start_daemon45
6 files changed, 166 insertions, 0 deletions
diff --git a/poky/meta/recipes-extended/lsb/lsb/0001-fix-lsb_release-to-work-with-busybox-head-and-find.patch b/poky/meta/recipes-extended/lsb/lsb/0001-fix-lsb_release-to-work-with-busybox-head-and-find.patch
new file mode 100644
index 000000000..017575206
--- /dev/null
+++ b/poky/meta/recipes-extended/lsb/lsb/0001-fix-lsb_release-to-work-with-busybox-head-and-find.patch
@@ -0,0 +1,38 @@
+From cba901945c5a6da9586550498f8e3787c57c3098 Mon Sep 17 00:00:00 2001
+From: Athanasios Oikonomou <athoik@gmail.com>
+Date: Fri, 17 Feb 2017 21:04:04 +0200
+Subject: [PATCH] fix lsb_release to work with busybox head and find
+
+Upstream-Status: Inappropriate [oe-core specific]
+Signed-off-by: Athanasios Oikonomou <athoik@gmail.com>
+
+diff --git a/lsb_release b/lsb_release
+index e7d6024..233b8c1 100755
+--- a/lsb_release
++++ b/lsb_release
+@@ -209,7 +209,7 @@ EASE ($DISTRIB_CODENAME)"
+ || [ -n "$(echo $DISTRIB_DESCRIPTION | \
+ sed -e "s/.*$DESCSTR_DELI.*//")" ]
+ then
+- TMP_DISTRIB_DESC=$(head -1 $FILENAME 2>/dev/null)
++ TMP_DISTRIB_DESC=$(head -n 1 $FILENAME 2>/dev/null)
+ [ -z "$DISTRIB_DESCRIPTION" ] \
+ && DISTRIB_DESCRIPTION=$TMP_DISTRIB_DESC
+ else
+@@ -249,10 +249,10 @@ GetDistribInfo() {
+ then
+ CHECKFIRST=$(find $INFO_ROOT/ -maxdepth 1 \
+ -name \*$INFO_DISTRIB_SUFFIX \
+- -and ! -name $INFO_LSB_FILE \
+- -and -type f \
++ -type f \
+ 2>/dev/null \
+- | head -1 ) # keep one of the files found (if many)
++ | grep -v $INFO_LSB_FILE \
++ | head -n 1 ) # keep one of the files found (if many)
+ fi
+ InitDistribInfo $CHECKFIRST
+ fi
+--
+2.1.4
+
diff --git a/poky/meta/recipes-extended/lsb/lsb/init-functions b/poky/meta/recipes-extended/lsb/lsb/init-functions
new file mode 100755
index 000000000..7c1dce24c
--- /dev/null
+++ b/poky/meta/recipes-extended/lsb/lsb/init-functions
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+# LSB initscript functions, as defined in the LSB Spec 1.1.0
+#
+# Lawrence Lim <llim@core.com> - Tue, 26 June 2007
+# Updated to the latest LSB 3.1 spec
+# http://refspecs.freestandards.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic_lines.txt
+
+start_daemon () {
+ /etc/core-lsb/lsb_start_daemon "$@"
+}
+
+killproc () {
+ /etc/core-lsb/lsb_killproc "$@"
+}
+
+pidofproc () {
+ /etc/core-lsb/lsb_pidofproc "$@"
+}
+
+log_success_msg () {
+ /etc/core-lsb/lsb_log_message success "$@"
+}
+
+log_failure_msg () {
+ /etc/core-lsb/lsb_log_message failure "$@"
+}
+
+log_warning_msg () {
+ /etc/core-lsb/lsb_log_message warning "$@"
+}
+
+# int log_begin_message (char *message)
+log_begin_msg () {
+ if [ -z "$1" ]; then
+ return 1
+ fi
+ echo " * $@"
+}
+
+
+log_end_msg () {
+ /etc/core-lsb/lsb_log_message end "$@"
+}
diff --git a/poky/meta/recipes-extended/lsb/lsb/lsb_killproc b/poky/meta/recipes-extended/lsb/lsb/lsb_killproc
new file mode 100755
index 000000000..866c1a9c6
--- /dev/null
+++ b/poky/meta/recipes-extended/lsb/lsb/lsb_killproc
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+. /etc/init.d/functions
+
+LSB=LSB-1.1 killproc $*
+exit $?
diff --git a/poky/meta/recipes-extended/lsb/lsb/lsb_log_message b/poky/meta/recipes-extended/lsb/lsb/lsb_log_message
new file mode 100755
index 000000000..10343b081
--- /dev/null
+++ b/poky/meta/recipes-extended/lsb/lsb/lsb_log_message
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+. /etc/init.d/functions
+
+ACTION=$1
+shift
+
+case "$ACTION" in
+ success)
+ echo -n $*
+ success "$*"
+ echo
+ ;;
+ failure)
+ echo -n $*
+ failure "$*"
+ echo
+ ;;
+ warning)
+ echo -n $*
+ warning "$*"
+ echo
+ ;;
+ *)
+ ;;
+esac
+exit 0
diff --git a/poky/meta/recipes-extended/lsb/lsb/lsb_pidofproc b/poky/meta/recipes-extended/lsb/lsb/lsb_pidofproc
new file mode 100755
index 000000000..6d1fd0f24
--- /dev/null
+++ b/poky/meta/recipes-extended/lsb/lsb/lsb_pidofproc
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+. /etc/init.d/functions
+
+pidofproc $*
+exit $?
diff --git a/poky/meta/recipes-extended/lsb/lsb/lsb_start_daemon b/poky/meta/recipes-extended/lsb/lsb/lsb_start_daemon
new file mode 100755
index 000000000..de62c2344
--- /dev/null
+++ b/poky/meta/recipes-extended/lsb/lsb/lsb_start_daemon
@@ -0,0 +1,45 @@
+#!/bin/sh
+
+. /etc/init.d/functions
+
+nice=
+force=
+pidfile=
+user=
+check=
+RETVAL=
+while [ "$1" != "${1##[-+]}" ]; do
+ case $1 in
+ -f)
+ force="--force"
+ shift
+ ;;
+ -n)
+ nice=$2
+ shift 2
+ ;;
+ -p)
+ pidfile="--pidfile $2"
+ shift 2
+ ;;
+ -u)
+ user="--user $2"
+ shift 2
+ ;;
+ -c)
+ check="--check $2"
+ shift 2
+ ;;
+ *)
+ echo "Unknown Option $1"
+ echo "Options are:"
+ echo "-f"
+ echo "-p {pidfile}"
+ echo "-n [+/-nicelevel]"
+ echo "-u {user}"
+ echo "-c {base}"
+ exit 1;;
+ esac
+done
+LSB=LSB-1.1 daemon ${force:-} ${nice:-} ${pidfile:-} ${user:-} ${check:-} $*
+exit $?
OpenPOWER on IntegriCloud