Commit Graph

73 Commits

Author SHA1 Message Date
Roy Marples
9ff89f8027 Punt rc_waitpid 2007-10-05 11:04:49 +00:00
Roy Marples
6d5ac5716b rc_make_env -> rc_env_config, rc_filter_env -> rc_env_filter 2007-10-03 14:48:50 +00:00
Roy Marples
563c6f46c0 rc_schedule_clear -> rc_service_schedule_clear, rc_schedule_start_service -> rc_service_schedule_start 2007-10-03 14:18:52 +00:00
Roy Marples
69ebf0c738 rc_allow_plug -> rc_service_plugable 2007-10-02 09:57:23 +00:00
Roy Marples
7d5c82cf63 rc_wait_service -> rc_service_wait 2007-09-29 17:03:38 +00:00
Roy Marples
b19e646575 Rationalise more functions into rc_service_ 2007-09-29 16:54:58 +00:00
Roy Marples
837f43e163 librc no longer uses libeinfo. deptree function names are now all under rc_deptree_ 2007-09-29 16:42:08 +00:00
Roy Marples
b153f67fe3 Ensure reading the console still works in parallel startup 2007-09-29 10:17:28 +00:00
Roy Marples
fc1bfe4234 Crashed is not a baselayout state as such 2007-09-28 15:04:15 +00:00
Roy Marples
7274301be2 rc_service_state now returns the state as a mask, which means that we can do things with just the one call making is more efficient. 2007-09-28 14:53:38 +00:00
Roy Marples
6f7f447978 enums are now fixed to specific values and are in UPPER CASE. 2007-09-28 12:29:23 +00:00
Roy Marples
8a7b58a73d rc_is_env is now rc_env_bool and just works with boolean values. 2007-09-26 07:05:33 +00:00
Mike Frysinger
ab0edd43b9 unify verbose/quiet handling 2007-09-25 23:17:25 +00:00
Roy Marples
c6c7df47a0 Revert last patch 2007-09-25 17:30:07 +00:00
Roy Marples
1a6451654f We no longer use bool in our public headers, using int instead. 2007-09-25 17:19:02 +00:00
Mike Frysinger
284286004e Add support for describing the options in the C programs. 2007-09-25 16:21:38 +00:00
Roy Marples
1e4e8ed27a Initial doxygen documentation for rc.h and einfo.h. Plus some header clean ups. 2007-09-25 15:38:21 +00:00
Roy Marples
45bd125dcc Use a pty for prefixed output instead of pipes for stdout/stderr. This
is so that programs can get information about the controlling terminal.
This change was triggered by bug #188506 where it's possible that
stdin, stdout and stderr didn't point to a terminal but ended up on one
via our pipes. Using a pty means that stdout and stderr always point to
a terminal, but we lose the ability to tell them apart.
If there is not a pty available then we use un-prefixed output as normal.
This change has also introduced the need for a signal pipe so that
SIGCHLD can exit the loop cleanly.
2007-09-21 08:49:43 +00:00
Roy Marples
81c009e47d Don't be an ass - don't free the 2nd list. Instead just empty it. 2007-09-18 15:43:19 +00:00
Roy Marples
75b5fdff29 Match the recent api change to rc_strlist_join also. We now free the 2nd list for ease of use. 2007-09-18 14:08:56 +00:00
Roy Marples
c8b03c96b7 API change! rc_config_env is renamed to rc_make_env and takes no argument. 2007-09-18 12:20:55 +00:00
Roy Marples
f1bba12892 API change! rc_strlist_add and friends now take char *** instead of
char ** and return a pointer to the item added instead of the new
list head. This is so we can easily tell if the item was successfully
added or not instead of iterating through the list looking for it.

list = rc_strlist_add (list, item);
becomes
rc_strlist_add (&list, item);
2007-09-18 11:36:55 +00:00
Roy Marples
144d9653e1 Undocument pause action, fix --nodeps and --ifstarted, #190045. 2007-08-28 13:06:44 +00:00
Roy Marples
0963e06766 Mark the right service as failed and only output a new line if we outputted anything at all for /etc/init.d/foo needsme 2007-08-17 13:23:43 +00:00
Roy Marples
adbe039385 When shutting down, stop the service even if dependants failed. 2007-08-17 11:31:36 +00:00
Roy Marples
0084bc41ef Don't link to rt anymore as it makes dlopen leak - we now use nanosleeps to achieve the same goal (a loop + timeout). No longer put / at the end of directories, instead prefix like so RC_LIBDIR "/foo" to ensure more robust code. 2007-08-09 14:33:20 +00:00
Roy Marples
94c6ff7bb7 Plug a leek for non selinux linux systems 2007-08-08 03:07:42 +00:00
Roy Marples
01ea7e3186 More pppd fixes 2007-08-07 20:23:38 +00:00
Roy Marples
c674026f9e All our binaries are now mulicalls into rc, which makes our on disk size
a lot smaller.
2007-07-31 16:05:56 +00:00
Roy Marples
6343b48893 RC_DEPEND_STRICT now controls dependency strictness.
If yes then we only use services in the boot and default runlevels,
regradless of service state.
If no then we take into account coldplugged services and the state
of currently running services.
Fixes #185640.
2007-07-21 12:49:51 +00:00
Roy Marples
e778dcbfb0 Fix restarting services with plugins 2007-07-11 14:28:54 +00:00
Roy Marples
356c41f77c Punt the dodgy ebuffer code. We now force prefixing for parallel starts which also reduces our variable pollution. 2007-07-11 12:06:37 +00:00
Roy Marples
2aa7ebfe0d Allow non root users to describe 2007-07-10 20:11:42 +00:00
Roy Marples
05201b514b init scripts and their extra options can now have descriptions, #184327. 2007-07-10 19:09:41 +00:00
Roy Marples
445918685e Support /etc/init.d/foo ineed and friends again. 2007-07-10 15:26:49 +00:00
Roy Marples
913b3b1f6b Of course, glibc does not have strlcpy 2007-07-06 17:07:29 +00:00
Roy Marples
809b5286b6 Make the prefix length dynamic 2007-07-06 15:50:40 +00:00
Roy Marples
f28763d492 As we're running each plugin in a fork, we need to call our cleanup code so we don't leak memory. To this extent, we now have the global boolean rc_in_plugin and the cleanup code can act accordingly. 2007-07-04 16:02:01 +00:00
Roy Marples
46156cc8cd We need the full path to the service before chdir / 2007-07-04 14:56:59 +00:00
Roy Marples
9c7bbdd774 We still need to wait for services we need/use 2007-07-03 08:38:27 +00:00
Roy Marples
f23b6d0e95 Don't wait for services that were inactive, #183667 thanks to Daniel Drake 2007-07-02 22:07:58 +00:00
Roy Marples
d6c72cc87c Fix error and only let root run init commands except for status and help 2007-07-02 19:57:18 +00:00
Roy Marples
0575c15993 Change pwd to / for all init scripts, #181224. 2007-06-26 08:47:46 +00:00
Roy Marples
fc597a8721 /etc/conf.d/rc.$runlevel now works, #177869. 2007-05-15 15:56:35 +00:00
Roy Marples
f3888d7613 Implement FreeBSD's dlfunc function to avoid ISO warnings on dlsym - thanks to drizztbsd for find public domain code :) 2007-05-14 19:50:13 +00:00
Roy Marples
d0308aaecd Use correct function casts. Use dlfunc where available to remove ISO warnings :) 2007-05-14 17:05:55 +00:00
Roy Marples
0942916b72 Allow time for pidfiles to be created, #178274.
Use int instead of char for getopt, #178084 thanks to drizztbsd.
2007-05-14 12:24:18 +00:00
Roy Marples
0380d98d7d restart/schedule stopped services when the trigger service goes inactive on a restart 2007-04-30 13:18:42 +00:00
Roy Marples
4d283afe31 /etc/init.d/foo start and stop no longer exit when service is fully
started or stopped, #176452.
2007-04-30 09:06:17 +00:00
Roy Marples
cf9aa106c6 Set fonts in init-early.sh, don't stop services twice when shutting down and lock prefixed output. 2007-04-26 11:24:07 +00:00