Magellan Linux

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

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

revision 931 by niro, Thu Nov 5 12:57:14 2009 UTC revision 1242 by niro, Fri Mar 11 17:14:05 2011 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"
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 145  evaluate_retval() Line 141  evaluate_retval()
141   print_status success   print_status success
142   else   else
143   print_status failure   print_status failure
144    
145     if [[ ${SPLASH_VERBOSE_ON_ERRORS} = 1 ]]
146     then
147     splash "rc_verbose" "${runlevel}"
148     fi
149   fi   fi
150    
151   return ${error_value}   return ${error_value}
# Line 288  reloadproc() Line 289  reloadproc()
289   else   else
290   signal=${2##-}   signal=${2##-}
291   signal=${signal##SIG}   signal=${signal##SIG}
   
292   fi   fi
293    
294   getpids $1   getpids $1
# Line 398  dolisting() Line 398  dolisting()
398  }  }
399    
400  # searches /proc/mounts for mounted fstypes (like ext3)  # searches /proc/mounts for mounted fstypes (like ext3)
401  is_fstype_mounted() {  is_fstype_mounted()
402    {
403   local filesys   local filesys
404   local i   local i
405   filesys=$1   filesys=$1
# Line 410  is_fstype_mounted() { Line 411  is_fstype_mounted() {
411  }  }
412    
413  # searches /proc/mounts for mounted fs names (like udev, proc)  # searches /proc/mounts for mounted fs names (like udev, proc)
414  is_fs_mounted() {  is_fs_mounted()
415    {
416   local filesys   local filesys
417   local i   local i
418   filesys=$1   filesys=$1
# Line 422  is_fs_mounted() { Line 424  is_fs_mounted() {
424  }  }
425    
426  # checks if kernel supports fs xy  # checks if kernel supports fs xy
427  kernel_supports_fs() {  kernel_supports_fs()
428    {
429   local filesys   local filesys
430   local i   local i
431   filesys=$1   filesys=$1
# Line 439  kernel_supports_fs() { Line 442  kernel_supports_fs() {
442  #   the reference file  #   the reference file
443  #  #
444  #   EXAMPLE: if is_older_than a.out *.o ; then ...  #   EXAMPLE: if is_older_than a.out *.o ; then ...
445  is_older_than() {  is_older_than()
446    {
447   local x=   local x=
448   local ref="$1"   local ref="$1"
449   shift   shift
# Line 456  is_older_than() { Line 460  is_older_than() {
460    
461   return 1   return 1
462  }  }
463    
464    start_devicemanager() { touch /dev/.none; return 0; }
465    stop_devicemanager() { return 0; }

Legend:
Removed from v.931  
changed lines
  Added in v.1242