Magellan Linux

Diff of /trunk/include/mtools.minc

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

revision 20 by niro, Thu Jun 2 21:36:05 2011 UTC revision 29 by niro, Fri Aug 26 22:19:37 2011 UTC
# Line 98  mreloadservice() Line 98  mreloadservice()
98   fi   fi
99  }  }
100    
   
101  # adds systemd units to runlevels and starts them  # adds systemd units to runlevels and starts them
102  # mstartunit service {/path/to/service_exec}  # mstartunit service {/path/to/service_exec}
103  mstartunit()  mstartunit()
# Line 142  mstartunit() Line 141  mstartunit()
141   # do not start services on bootstrap or MROOT!=/   # do not start services on bootstrap or MROOT!=/
142   if [[ ${MAGE_BOOTSTRAP} != true ]] && [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]]   if [[ ${MAGE_BOOTSTRAP} != true ]] && [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]]
143   then   then
144     echo -e " ${COLBLUE}[${COLGREEN}+${COLBLUE}]${COLDEFAULT} starting unit ${service} ..."
145   # start or restart the service   # start or restart the service
146   systemctl try-restart ${service}   # dont use try-restart, works only with active services!
147     systemctl restart ${service}
148   fi   fi
149  }  }
150    
# Line 193  mstopunit() Line 194  mstopunit()
194   # do not stop services on bootstrap or MROOT!=/   # do not stop services on bootstrap or MROOT!=/
195   if [[ ${MAGE_BOOTSTRAP} != true ]] && [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]]   if [[ ${MAGE_BOOTSTRAP} != true ]] && [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]]
196   then   then
197     echo -e " ${COLBLUE}[${COLGREEN}+${COLBLUE}]${COLDEFAULT} stopping unit ${service} ..."
198   systemctl stop ${service}   systemctl stop ${service}
199   # try harder   # try harder
200   if [[ -n $(pidof ${service_exec}) ]]   if [[ -n $(pidof ${service_exec}) ]]
# Line 238  mreloadunit() Line 240  mreloadunit()
240   esac   esac
241   fi   fi
242    
243     # reload daemon to honor changed unit files
244     systemctl daemon-reload
245    
246   # do not stop services on bootstrap or MROOT!=/   # do not stop services on bootstrap or MROOT!=/
247   if [[ ${MAGE_BOOTSTRAP} != true ]] && [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]]   if [[ ${MAGE_BOOTSTRAP} != true ]] && [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]]
248   then   then

Legend:
Removed from v.20  
changed lines
  Added in v.29