summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/lsb/lsb/lsb_start_daemon
diff options
context:
space:
mode:
authorXiaofeng Yan <xiaofeng.yan@windriver.com>2011-05-10 16:30:16 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-05-11 16:43:22 +0100
commit1809999605cc2dab60ed0f96e92e563a073f0b5d (patch)
treec1c51ccc4c5cc81361df8fa6d41415ef2befa5f6 /meta/recipes-extended/lsb/lsb/lsb_start_daemon
parent1320cad1ca5c10a3b639ac2b7116bd8acd735725 (diff)
downloadpoky-1809999605cc2dab60ed0f96e92e563a073f0b5d.tar.gz
init-functions: Conforming applications may install one or more initialization scripts
LSB Test Suite need init scripts for lsb-image. During the installer's post-install processing phase the program /usr/lib/lsb/install_initd \ must be called to activate the init script. \ When a software package is removed, /usr/lib/lsb/remove_initd \ must be called to deactivate the init script. (From OE-Core rev: 5c846091b034fff21333487df4ada5667eb8e247) Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended/lsb/lsb/lsb_start_daemon')
-rwxr-xr-xmeta/recipes-extended/lsb/lsb/lsb_start_daemon45
1 files changed, 45 insertions, 0 deletions
diff --git a/meta/recipes-extended/lsb/lsb/lsb_start_daemon b/meta/recipes-extended/lsb/lsb/lsb_start_daemon
new file mode 100755
index 0000000000..05b6371771
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsb/lsb_start_daemon
@@ -0,0 +1,45 @@
1#!/bin/bash
2
3. /etc/init.d/functions
4
5nice=
6force=
7pidfile=
8user=
9check=
10RETVAL=
11while [ "$1" != "${1##[-+]}" ]; do
12 case $1 in
13 -f)
14 force="--force"
15 shift
16 ;;
17 -n)
18 nice=$2
19 shift 2
20 ;;
21 -p)
22 pidfile="--pidfile $2"
23 shift 2
24 ;;
25 -u)
26 user="--user $2"
27 shift 2
28 ;;
29 -c)
30 check="--check $2"
31 shift 2
32 ;;
33 *)
34 echo "Unknown Option $1"
35 echo "Options are:"
36 echo "-f"
37 echo "-p {pidfile}"
38 echo "-n [+/-nicelevel]"
39 echo "-u {user}"
40 echo "-c {base}"
41 exit 1;;
42 esac
43done
44LSB=LSB-1.1 daemon ${force:-} ${nice:-} ${pidfile:-} ${user:-} ${check:-} $*
45exit $?