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 1092 by niro, Thu Nov 5 12:57:14 2009 UTC revision 1093 by niro, Wed Jul 14 13:07:30 2010 UTC
# Line 40  COLDEFAULT="\033[0m" Line 40  COLDEFAULT="\033[0m"
40    
41  COLOREDSTAR="${COLBLUE}(${COLGREEN}*${COLBLUE})${COLDEFAULT} "  COLOREDSTAR="${COLBLUE}(${COLGREEN}*${COLBLUE})${COLDEFAULT} "
42    
43  #location to save the started services  # location to save the started services
44  svcdir="/var/lib/init.d"  svcdir="/var/lib/init.d"
45  svclib="/lib/rcscripts"  svclib="/lib/rcscripts"
46  svcmount="no"  svcmount="no"
# Line 49  svcsize=1024 Line 49  svcsize=1024
49    
50    
51  # dummy function; needed if splashutils are not installed  # dummy function; needed if splashutils are not installed
52  splash() {  splash() { return 0; }
  return 0  
 }  
   
53    
54  #source splash functions if exists  # source splash functions if exists
55  [ -f /etc/init.d/splash-functions ] && source /etc/init.d/splash-functions  [ -f /etc/init.d/splash-functions ] && source /etc/init.d/splash-functions
56    
   
   
57  print_error_msg()  print_error_msg()
58  {  {
59   return 0   return 0
# Line 98  update_svcstatus() Line 93  update_svcstatus()
93   local SVCD_INITSCRIPT   local SVCD_INITSCRIPT
94   local x   local x
95    
   
96   #do this only if proc is mounted   #do this only if proc is mounted
97   [ ! -f /proc/mounts ] && return 0   [ ! -f /proc/mounts ] && return 0
98    
# Line 288  reloadproc() Line 282  reloadproc()
282   else   else
283   signal=${2##-}   signal=${2##-}
284   signal=${signal##SIG}   signal=${signal##SIG}
   
285   fi   fi
286    
287   getpids $1   getpids $1
# Line 398  dolisting() Line 391  dolisting()
391  }  }
392    
393  # searches /proc/mounts for mounted fstypes (like ext3)  # searches /proc/mounts for mounted fstypes (like ext3)
394  is_fstype_mounted() {  is_fstype_mounted()
395    {
396   local filesys   local filesys
397   local i   local i
398   filesys=$1   filesys=$1
# Line 410  is_fstype_mounted() { Line 404  is_fstype_mounted() {
404  }  }
405    
406  # searches /proc/mounts for mounted fs names (like udev, proc)  # searches /proc/mounts for mounted fs names (like udev, proc)
407  is_fs_mounted() {  is_fs_mounted()
408    {
409   local filesys   local filesys
410   local i   local i
411   filesys=$1   filesys=$1
# Line 422  is_fs_mounted() { Line 417  is_fs_mounted() {
417  }  }
418    
419  # checks if kernel supports fs xy  # checks if kernel supports fs xy
420  kernel_supports_fs() {  kernel_supports_fs()
421    {
422   local filesys   local filesys
423   local i   local i
424   filesys=$1   filesys=$1
# Line 439  kernel_supports_fs() { Line 435  kernel_supports_fs() {
435  #   the reference file  #   the reference file
436  #  #
437  #   EXAMPLE: if is_older_than a.out *.o ; then ...  #   EXAMPLE: if is_older_than a.out *.o ; then ...
438  is_older_than() {  is_older_than()
439    {
440   local x=   local x=
441   local ref="$1"   local ref="$1"
442   shift   shift

Legend:
Removed from v.1092  
changed lines
  Added in v.1093