Magellan Linux

Diff of /trunk/include/mtools.minc

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

revision 43 by niro, Mon Jan 30 22:43:33 2012 UTC revision 63 by niro, Wed Oct 9 12:23:06 2013 UTC
# Line 133  mstartunit() Line 133  mstartunit()
133   local service="$1"   local service="$1"
134   local service_exec="$2"   local service_exec="$2"
135   local opts   local opts
136     local chroot
137    
138   # only run if systemd was found   # only run if systemd was found
139   if [[ ! -x /bin/systemctl ]] && [[ ! -x /usr/bin/systemctl ]]   if [[ ! -x /bin/systemctl ]] && [[ ! -x /usr/bin/systemctl ]]
# Line 150  mstartunit() Line 151  mstartunit()
151    
152   if [[ ${MROOT} != / ]] && [[ ! -z ${MROOT} ]]   if [[ ${MROOT} != / ]] && [[ ! -z ${MROOT} ]]
153   then   then
154   opts="--root ${MROOT}"   # symlinks root path too, not exactly what we want
155     #opts="--root ${MROOT}"
156     if [ -x $(type -P systemd-nspawn) ]
157     then
158     chroot="$(type -P systemd-nspawn)"
159     else
160     chroot="chroot"
161     fi
162   fi   fi
163    
164   if [[ -z ${service_exec} ]]   if [[ -z ${service_exec} ]]
# Line 167  mstartunit() Line 175  mstartunit()
175   # add service to default runlevels   # add service to default runlevels
176   echo -e " ${COLBLUE}[${COLGREEN}+${COLBLUE}]${COLDEFAULT} adding unit ${service} to default runlevels ..."   echo -e " ${COLBLUE}[${COLGREEN}+${COLBLUE}]${COLDEFAULT} adding unit ${service} to default runlevels ..."
177   # reload daemon to honor changed unit files   # reload daemon to honor changed unit files
178   systemctl ${opts} daemon-reload   if [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]]
179   systemctl ${opts} enable ${service}   then
180     systemctl ${opts} daemon-reload
181     fi
182     ${chroot} systemctl ${opts} enable ${service}
183    
184   # do not start services on bootstrap or MROOT!=/   # do not start services on bootstrap or MROOT!=/
185   if [[ ${MAGE_BOOTSTRAP} != true ]] && [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]]   if [[ ${MAGE_BOOTSTRAP} != true ]] && [[ -z ${MROOT} ]] || [[ ${MROOT} = / ]]

Legend:
Removed from v.43  
changed lines
  Added in v.63