Magellan Linux

Diff of /trunk/magellan-initscripts/etc/rc.d/init.d/functions

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

revision 274 by niro, Fri Oct 21 15:21:41 2005 UTC revision 505 by niro, Sat Jul 21 19:23:16 2007 UTC
# Line 1  Line 1 
1  #!/bin/bash  #!/bin/bash
2  # $Header: /home/cvsd/magellan-cvs/magellan-src/magellan-initscripts/etc/rc.d/init.d/functions,v 1.5 2005-10-21 15:21:41 niro Exp $  # $Header: /home/cvsd/magellan-cvs/magellan-src/magellan-initscripts/etc/rc.d/init.d/functions,v 1.7 2007-07-21 19:23:16 niro Exp $
3    
4  # Begin $rc_base/init.d/functions - Run Level Control Functions  # Begin $rc_base/init.d/functions - Run Level Control Functions
5    
# Line 137  update_svcstatus() Line 137  update_svcstatus()
137    
138  evaluate_retval()  evaluate_retval()
139  {  {
140   error_value=$?   local error_value="$1"
141     [[ -z ${error_value} ]] && error_value=$?
142    
143   if [ $error_value = 0 ]   if [[ ${error_value} = 0 ]]
144   then   then
145   print_status success   print_status success
146   else   else
147   print_status failure   print_status failure
148   fi   fi
149    
150   return $error_value   return ${error_value}
151  }  }
152    
153  print_status()  print_status()
# Line 348  progressbar() Line 349  progressbar()
349   fi   fi
350  }  }
351    
352    kernel_version()
353    {
354     local KV="$(uname -r | cut -d- -f1)"
355     echo "${KV}"
356    }
357    
358  kernel_major_version()  kernel_major_version()
359  {  {
360   local KV   local KV
361   KV="$(uname -r|cut -d. -f1-2)"   KV="$(uname -r | cut -d. -f1-2)"
362   echo "${KV}"   echo "${KV}"
363  }  }
364    
365  dolisting()  dolisting()
366  {  {
367   local x=   local x=
368   local y=   local y=

Legend:
Removed from v.274  
changed lines
  Added in v.505