Magellan Linux

Diff of /mcore-src/trunk/mcore-tools/src/modules/sysvinit/sysvinit.client.class.in

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

mcore-src/trunk/mcore-tools/daemon/client/include/sysvinit.client.class revision 2090 by niro, Fri May 10 13:37:51 2013 UTC mcore-src/trunk/mcore-tools/src/modules/sysvinit/sysvinit.client.class.in revision 2269 by niro, Tue Jan 14 10:34:57 2014 UTC
# Line 5  require basic-system Line 5  require basic-system
5    
6  set_system_service()  set_system_service()
7  {  {
8   local command="$1"   local command="${CLASS_ARGV[0]}"
9   local service="$2"   local service="${CLASS_ARGV[1]}"
10   local opts="$3"   local opts="${CLASS_ARGV[2]}"
11    
12   [[ -z ${command} ]] && help_system_service && return 1   [[ -z ${command} ]] && help_system_service && return 1
13   [[ -z ${service} ]] && help_system_service && return 1   [[ -z ${service} ]] && help_system_service && return 1
14    
15   if [[ ! -x ${MROOT}/etc/rc.d/init.d/${service} ]]   if [[ ! -x ${MROOT}@@SYSVRCDDIR@@/${service} ]]
16   then   then
17   eecho "Service '${service}' unkown!"   eecho "Service '${service}' unknown!"
18   return 1   return 1
19   fi   fi
20    
# Line 29  set_system_service() Line 29  set_system_service()
29   fi   fi
30    
31   case "${command}" in   case "${command}" in
32   start) /etc/rc.d/init.d/"${service}" start ;;   start) @@SYSVRCDDIR@@/"${service}" start ;;
33   stop) /etc/rc.d/init.d/"${service}" stop ;;   stop) @@SYSVRCDDIR@@/"${service}" stop ;;
34   restart) /etc/rc.d/init.d/"${service}" restart ;;   restart) @@SYSVRCDDIR@@/"${service}" restart ;;
35   reload) /etc/rc.d/init.d/"${service}" reload ;;   reload) @@SYSVRCDDIR@@/"${service}" reload ;;
36   enable) rc-config add "${service}" ;;   enable) rc-config add "${service}" ;;
37   disable) rc-config del "${service}" ;;   disable) rc-config del "${service}" ;;
38   *) help_system_service && return ;;   *) help_system_service && return ;;
# Line 41  set_system_service() Line 41  set_system_service()
41    
42  get_system_service()  get_system_service()
43  {  {
44   local command="$1"   local command="${CLASS_ARGV[0]}"
45   local service="$2"   local service="${CLASS_ARGV[1]}"
46    
47   [[ -z ${command} ]] && help_system_service && return 1   [[ -z ${command} ]] && help_system_service && return 1
48   [[ -z ${service} ]] && help_system_service && return 1   [[ -z ${service} ]] && help_system_service && return 1
49    
50   if [[ ! -x ${MROOT}/etc/rc.d/init.d/${service} ]]   if [[ ! -x ${MROOT}@@SYSVRCDDIR@@/${service} ]]
51   then   then
52   eecho "Service '${service}' unkown!"   eecho "Service '${service}' unknown!"
53   return 1   return 1
54   fi   fi
55    
# Line 64  get_system_service() Line 64  get_system_service()
64   fi   fi
65    
66   case "${command}" in   case "${command}" in
67   status) /etc/rc.d/init.d/"${service}" status ;;   status) @@SYSVRCDDIR@@/"${service}" status ;;
68   enabled) rc-config show "${service}" ;;   enabled) rc-config show "${service}" ;;
69   runlevel) eecho "function on todo" ;;   runlevel) eecho "function on todo" ;;
70   *) help_system_service && return ;;   *) help_system_service && return ;;

Legend:
Removed from v.2090  
changed lines
  Added in v.2269