Magellan Linux

Annotation of /trunk/include/sysvinit.sminc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 19668 - (hide annotations) (download)
Wed Oct 9 13:09:29 2013 UTC (10 years, 7 months ago) by niro
File size: 755 byte(s)
-split udev, hal, systemd and sysvinit functions into seperate includes and use pkgconfig if possible
1 niro 19668 # 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     }