From 1809999605cc2dab60ed0f96e92e563a073f0b5d Mon Sep 17 00:00:00 2001 From: Xiaofeng Yan Date: Tue, 10 May 2011 16:30:16 +0800 Subject: 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 Signed-off-by: Richard Purdie --- meta/recipes-extended/lsb/lsb/lsb_start_daemon | 45 ++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100755 meta/recipes-extended/lsb/lsb/lsb_start_daemon (limited to 'meta/recipes-extended/lsb/lsb/lsb_start_daemon') 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 @@ +#!/bin/bash + +. /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 $? -- cgit v1.2.3-54-g00ecf