Commit Graph

94 Commits

Author SHA1 Message Date
Roy Marples
2ef9c5c520 Only start plugins once we have made an exclusive file 2007-11-19 13:46:09 +00:00
Roy Marples
da153631e7 Run the hook_out if set 2007-11-16 11:58:41 +00:00
Roy Marples
505f6951c4 If starting and started or stopping and stopped, just warn and continue. Fixes Gentoo bug #176452 again. 2007-11-16 11:55:08 +00:00
Roy Marples
69a040bf85 Show help if we don't have any args, Gentoo #198380. 2007-11-14 16:19:56 +00:00
Roy Marples
d3b7a91796 Use realpath to resolve our service. 2007-11-14 15:29:25 +00:00
Roy Marples
39227ede1d relicense as 2-clause BSD, with the kind permission of Gentoo 2007-11-14 15:22:04 +00:00
Roy Marples
c8de77fbbe Fix starting state and clean some whitespace 2007-10-31 22:34:26 +00:00
Roy Marples
c02cc42b1d Fix the restarting of services depending on the script you're restarting 2007-10-26 12:22:26 +00:00
Roy Marples
9dddb43eb4 Wait for plugins to finish before moving on. 2007-10-22 19:33:42 +00:00
Roy Marples
5d215f9d63 const correctness 2007-10-15 14:40:53 +00:00
Roy Marples
20a149b2c7 malloc over fatty buffers 2007-10-12 00:01:33 +00:00
Roy Marples
e3bc6666d6 malloc data size, not pointer size 2007-10-11 23:17:53 +00:00
Roy Marples
25091eb4f4 Don't run the done hook twice 2007-10-10 06:24:08 +00:00
Roy Marples
183b7464d3 We should only have one block of code that restores state 2007-10-09 21:20:10 +00:00
Roy Marples
d468572206 Improve applet help a little. Also, if mountinfo as any mounts given, work explictly with --netdev/--nonetdev 2007-10-09 17:41:53 +00:00
Roy Marples
db468457dc Foo, should be a mask 2007-10-09 15:47:25 +00:00
Roy Marples
537ef36350 Ensure that runscript returns 0 when service is started 2007-10-09 15:44:22 +00:00
Roy Marples
e89805e0c0 Quiet some compile time warnings on uclibc 2007-10-09 12:52:09 +00:00
Roy Marples
cd4bce7e8d Wups, should be xstrdup 2007-10-08 11:16:22 +00:00
Roy Marples
a89ceb7e2c Punt rc_ from xstrdup, xalloc, xrealloc and exists as they're not in librc anymore 2007-10-08 11:11:21 +00:00
Roy Marples
e7dab9bb91 Move rc_env_filter and rc_env_config out of librc and into rc 2007-10-08 11:07:39 +00:00
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