Magellan Linux

Diff of /trunk/initscripts/sysvinit/rc/functions

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

revision 505 by niro, Sat Jul 21 19:23:16 2007 UTC revision 1241 by niro, Fri Mar 11 17:13:32 2011 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.7 2007-07-21 19:23:16 niro Exp $  # $Id$
3    
4  # Begin $rc_base/init.d/functions - Run Level Control Functions  # Begin $rc_base/init.d/functions - Run Level Control Functions
5    
# 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"
47  svcfstype="tmpfs"  svcfstype="tmpfs"
48  svcsize=1024  svcsize=1024
49    
50    rc_echo() { echo $@; }
51    rc_print() { rc_echo -e "${COLOREDSTAR}$@"; }
52    
53  # dummy function; needed if splashutils are not installed  # dummy function; needed if splashutils are not installed
54  splash() {  splash() { return 0; }
  return 0  
 }  
   
55    
56  #source splash functions if exists  # source splash functions if exists
57  [ -f /etc/init.d/splash-functions ] && source /etc/init.d/splash-functions  [ -f /etc/init.d/splash-functions ] && source /etc/init.d/splash-functions
58    
   
   
59  print_error_msg()  print_error_msg()
60  {  {
61   return 0   return 0
# Line 98  update_svcstatus() Line 95  update_svcstatus()
95   local SVCD_INITSCRIPT   local SVCD_INITSCRIPT
96   local x   local x
97    
   
98   #do this only if proc is mounted   #do this only if proc is mounted
99   [ ! -f /proc/mounts ] && return 0   [ ! -f /proc/mounts ] && return 0
100    
# Line 288  reloadproc() Line 284  reloadproc()
284   else   else
285   signal=${2##-}   signal=${2##-}
286   signal=${signal##SIG}   signal=${signal##SIG}
   
287   fi   fi
288    
289   getpids $1   getpids $1
# Line 398  dolisting() Line 393  dolisting()
393  }  }
394    
395  # searches /proc/mounts for mounted fstypes (like ext3)  # searches /proc/mounts for mounted fstypes (like ext3)
396  is_fstype_mounted() {  is_fstype_mounted()
397    {
398   local filesys   local filesys
399   local i   local i
400   filesys=$1   filesys=$1
# Line 410  is_fstype_mounted() { Line 406  is_fstype_mounted() {
406  }  }
407    
408  # searches /proc/mounts for mounted fs names (like udev, proc)  # searches /proc/mounts for mounted fs names (like udev, proc)
409  is_fs_mounted() {  is_fs_mounted()
410    {
411   local filesys   local filesys
412   local i   local i
413   filesys=$1   filesys=$1
# Line 422  is_fs_mounted() { Line 419  is_fs_mounted() {
419  }  }
420    
421  # checks if kernel supports fs xy  # checks if kernel supports fs xy
422  kernel_supports_fs() {  kernel_supports_fs()
423    {
424   local filesys   local filesys
425   local i   local i
426   filesys=$1   filesys=$1
# Line 439  kernel_supports_fs() { Line 437  kernel_supports_fs() {
437  #   the reference file  #   the reference file
438  #  #
439  #   EXAMPLE: if is_older_than a.out *.o ; then ...  #   EXAMPLE: if is_older_than a.out *.o ; then ...
440  is_older_than() {  is_older_than()
441    {
442   local x=   local x=
443   local ref="$1"   local ref="$1"
444   shift   shift
# Line 456  is_older_than() { Line 455  is_older_than() {
455    
456   return 1   return 1
457  }  }
458    
459    start_devicemanager() { touch /dev/.none; return 0; }
460    stop_devicemanager() { return 0; }

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