Chinaunix首页 | 论坛 | 博客
  • 博客访问: 143023
  • 博文数量: 82
  • 博客积分: 1415
  • 博客等级: 上尉
  • 技术积分: 890
  • 用 户 组: 普通用户
  • 注册时间: 2009-06-08 22:30
文章分类

全部博文(82)

文章存档

2011年(1)

2009年(81)

我的朋友

分类: LINUX

2009-07-10 22:13:59

 

The /lib/rcscripts/sh/rc_services.sh file is included by the initscript during the stage and performs the following series of functions:

  1. Flag ="yes" to avoid repetition
  2. Obtain definitions and functions from the functions.sh include file
  3. Run /sbin/depscan.sh, if running as root and this has not already been done
  4. Define a series of internal variables
  5. Define a series of functions

Defined Functions

The following functions are defined within rc-services.sh:

begin_service 	Mark a service as being started using an exclusive locking mechanism
broken 	Echo a list of services that are not present that the named service requires
check_dependency 	List all services dependent on a named service and provide a facility to check if one service is a dependency of another service
dependon 	Returns two if the first service is dependent on the second
end_service 	Remove the started service mark using an exclusive locking mechanism
get_dep_info 	Configure internal variables to contain data for a named service
get_service_index 	Find a service name in an array index
get_options 	Read an option string from a configuration file, previously written using save_options
iafter 	Return a list of services that have started before starting the named service
ibefore 	Start the named service and echo a list of services that start after it
ineed 	Echo a list of all services that the named service needs
in_runlevel 	Returns true if the specified service is in the specified runlevel
is_fake_service 	Returns true if the specified service is fake in the specified runlevel
is_net_up 	Return true if the net service is considered up
is_runlevel_start 	Returns true if runlevel has changed and system is busy starting services
is_runlevel_stop 	Returns true if runlevel has changed and system is busy stopping services
iuse 	Echo a list of all services that the named service uses
mark_service_coldplugged 	Mark service as coldplugged
mark_service_failed 	Mark service failed for current runlevel (only valid during a runlevel change)
mark_service_inactive 	Mark service as inactive
mark_service_started 	Mark service as started
mark_service_starting 	Mark service as starting
mark_service_stopped 	Mark service as stopped
mark_service_stopping 	Mark service as stopping
needsme 	Echo a list of services that need the named service
net_service 	Returns true if the specified service is controls a network interface
query_before 	Returns true if the specified second service should start before the first
save_options 	Write an option string to a configuration file
service_coldplugged 	Returns true if specified service is coldplugged
service_failed 	Returns true if specified service has failed at this runlevel
service_inactive 	Returns true if specified service is inactive
service_message 	Print out a service message if parallel startup is being used
service_scheduled 	Returns true if service is scheduled to be started by another service
service_scheduled_by 	Echo a list of services which will try and start the specified service
service_started 	Returns true if specified service is started
service_started_daemon 	Returns zero if the service started the specified daemon
service_starting 	Returns true if specified service is starting
service_stopped 	Returns true if specified service is stopped
service_stopping 	Returns true if specified service is stopping
service_wasinactive 	Returns true if specified service was inactive
start_service 	Start service, marking as starting and echo appropriate messages
stop_service 	Stop service, marking as starting and echo appropriate messages
test_service_state 	Returns zero if the service link exists and points to a file
trace_dependencies 	Get and sort the dependencies of given services
usesme 	Echo a list of services that use the named service
valid_i 	Shared code module for valid_after and valid_iuse
valid_iuse 	Echo use for the named service
valid_iafter 	Echo valid services that should start before the specified service for the current or boot runlevel
wait_service 	Wait for a service to start or an error to occur
Retrieved from ""
阅读(662) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~