Contents of /branches/R11-stable/include/sysvinit.sminc
Parent Directory | Revision Log
Revision 20245 -
(show annotations)
(download)
Wed Nov 27 09:58:38 2013 UTC (10 years, 10 months ago) by niro
File size: 755 byte(s)
Wed Nov 27 09:58:38 2013 UTC (10 years, 10 months ago) by niro
File size: 755 byte(s)
-release branches/R11-stable
1 | # sysvinit specific functions |
2 | |
3 | # automatical inherit sysvinit.minc |
4 | # this will provide the service management functions |
5 | INHERITS+=" sysvinit" |
6 | |
7 | DEPEND="${DEPEND} |
8 | >= virtual/sysvinit" |
9 | |
10 | sminclude mtools |
11 | |
12 | # installs initscripts |
13 | # minstallrc /path/to/rc-script {destfilename} |
14 | minstallrc() |
15 | { |
16 | local rcscript |
17 | local file |
18 | |
19 | [[ -z "$1" ]] && die "No initscript given" |
20 | |
21 | # if no fullpath given use file from sourcedir |
22 | if [[ -z $(dirname $1) ]] || [[ $(dirname $1) = . ]] |
23 | then |
24 | file="${SOURCEDIR}/$(mpname)/$1" |
25 | else |
26 | file="$1" |
27 | fi |
28 | |
29 | if [[ -n "$2" ]] |
30 | then |
31 | rcscript="$2" |
32 | else |
33 | rcscript="$(basename ${file})" |
34 | fi |
35 | |
36 | # needed directory |
37 | minstalldir /etc/rc.d/init.d || die |
38 | |
39 | # install our initscript |
40 | minstallexec ${file} /etc/rc.d/init.d/${rcscript} || die |
41 | } |