Roy Marples
50b8aba8d9
Remove coldplug and just have hotplug which is a list of allowed/disallowed services. Makes things much easier.
2008-10-10 09:08:59 +00:00
Roy Marples
d6da8e8c48
sysinit is now a real runlevel that handles things like udev, dmesg and
...
mounting various bits in /dev and /sys.
init.sh JUST mounts /lib/rc/init.d (and /proc for Linux systems)
To make development of this easier we now return an empty RC_STRINGLIST
instead of a NULL for empty things.
If you don't have a udev init script installed, don't reboot your box OR
roll back to an older OpenRC version.
2008-10-10 08:37:21 +00:00
Roy Marples
cb44b0a46c
#ifdef atexit cleanups calling free as the OS should do this for us, but valgrind debuggers need it.
2008-10-06 15:02:32 +00:00
Roy Marples
41c1e170d6
Add an env var so plugins know when leaving single means the end, or start the default level.
2008-10-01 08:46:53 +00:00
Roy Marples
f53197818b
Correcly call the right runlevel for plugins when shutting down.
2008-10-01 06:10:34 +00:00
Roy Marples
28d7fb9430
When stopping services, check the newlevel if given otherwise the current runlevel. Fixes #100 .
2008-09-27 16:56:03 +00:00
Roy Marples
17bf78a539
Use the new rc_stringlist_find function.
2008-09-18 15:20:57 +00:00
Roy Marples
072328ff60
rc_nostop now lists services we should not stop on shutdown.
2008-09-18 15:13:53 +00:00
Roy Marples
80a17eb596
Clean up some compile warnings.
2008-09-18 13:09:51 +00:00
Roy Marples
5c114d9430
When testing services to stop, we should trace it. More for #79 .
2008-05-12 23:45:17 +00:00
Roy Marples
3663cf1e2a
Only launch single user when RUNLEVEL == S, #74 .
2008-05-10 10:04:34 +00:00
Roy Marples
619b0b4f37
Fix the EINTR check for waitpid, Gentoo #219929 .
2008-05-06 21:53:21 +00:00
Roy Marples
5ae702339e
We don't need to handle SIGWINCH in sysinit, so this should fix loading a framebuffer module in init.sh (Gentoo #219929 . Ideally someone should tell me why this is happening and if there is a better fix.
2008-05-06 16:21:16 +00:00
Roy Marples
e273b4e08e
Fix another leak.
2008-04-29 11:08:02 +00:00
Roy Marples
53902cefb8
Add rc_program function which uses fork and signal masking to try and resolve the waitpid issue, Gentoo #219179 .
2008-04-28 16:04:16 +00:00
Roy Marples
b5d829789f
Check we have a list before running depends.
2008-04-26 14:57:39 +00:00
Roy Marples
f0aacec02e
Cast to unsigned char for ctype calls.
2008-04-17 10:19:58 +00:00
Roy Marples
e82435c2f4
rc_runlevel is now the preferred kernel commandline option for choosing default runlevel.
2008-04-08 15:59:56 +00:00
Roy Marples
dcdfdb442f
Some systems are only detectable after /proc is mounted, so re-test if unknown.
2008-04-06 20:06:07 +00:00
Roy Marples
143239e143
Increase pidstr size to 10 chars.
2008-04-06 13:24:10 +00:00
Roy Marples
11e33e81c8
Remove rc_service_start/stop from librc as they block and unmask signals. The application may not wish this behaviour and should fork/exec the service itself.
2008-03-28 08:42:05 +00:00
Roy Marples
15d34d0a16
Add license blurb to a few files and append my email to my name.
2008-03-26 17:53:37 +00:00
Roy Marples
3f37d4771b
If we have coldplugged services, but no start_services, we need to create a new list for start_services.
2008-03-26 05:08:38 +00:00
Roy Marples
0347f01345
Fix segfault when no coldplugged services, thanks to Daijo.
2008-03-24 13:30:24 +00:00
Roy Marples
5a80daaf43
Fix coldplug disabling.
2008-03-24 13:09:42 +00:00
Roy Marples
821166fbfd
Fix debug support to work without gmake and bundle -ggdb in properly.
2008-03-24 11:43:03 +00:00
Mike Frysinger
bd34df6361
add support for automatic gdb launching when RC_DEBUG is defined to 1 to ease bug reporting / information gathering
2008-03-22 23:02:30 +00:00
Roy Marples
a4f9eb699b
Fix some crashers in a prefix with few services.
2008-03-21 20:02:10 +00:00
Roy Marples
fe90a548b5
ksoftlevel -> krunlevel
2008-03-21 10:34:09 +00:00
Roy Marples
d9ec62b22a
Add rc-service and update all softlevel refs to runlevel.
2008-03-19 17:11:50 +00:00
Roy Marples
773d50dabb
Get going_down and parallel the right away round.
2008-03-18 23:06:02 +00:00
Roy Marples
51c825ceee
Make rc_getline private and save it's buffer so it's sort of like getline from glibc.
2008-03-17 21:27:37 +00:00
Roy Marples
b2f7606b23
We should check for NULL here.
2008-03-17 14:31:44 +00:00
Roy Marples
4c14666423
Punt the rc_strcatpaths function and use snprintf instead to save on expensive malloc calls.
2008-03-17 13:25:56 +00:00
Roy Marples
50a7697bf2
rc_find_pids now returns RC_PIDLIST instead of a NULL terminated array.
2008-03-17 09:59:52 +00:00
Roy Marples
40930d7d0a
Use correct TAILQ_CONCAT macro when not defined.
2008-03-16 17:27:13 +00:00
Roy Marples
cb9da6a262
Remove null terminated char ** lists in favour of RC_STRINGLIST, using TAILQ from queue(3). Refactor code style around the BSD KNF.
2008-03-16 17:00:56 +00:00
Roy Marples
40e12f6ba0
RC_SERVICE now points to the service file, so daemons can recall us directly.
2008-03-11 15:00:16 +00:00
Roy Marples
0fa512c2b5
Coldplug net devices on the BSD's as found by getifaddrs.
2008-03-11 11:03:34 +00:00
Roy Marples
2f22f9dfeb
Test access instead of euid.
2008-03-06 11:39:05 +00:00
Roy Marples
19bad914bc
Show version similar to gcc.
2008-03-05 17:31:19 +00:00
Roy Marples
7aa231de2e
Style.
2008-03-05 10:03:36 +00:00
Roy Marples
4ae5aebe81
Inform plugins when we exit if on signal.
2008-03-04 20:41:25 +00:00
Roy Marples
e55cb5dd5b
Fix compile on Linux.
2008-03-03 17:22:01 +00:00
Roy Marples
15cf41e713
Split VPS into VSERVER and OPENVZ
2008-03-03 17:19:56 +00:00
Roy Marples
f3e90dddbf
rc single and rc sysinit don't check sysvinit env vars in prefix.
2008-03-03 15:57:36 +00:00
Roy Marples
a12dbdc6c9
Don't check for root in prefix.
2008-03-02 21:13:21 +00:00
Roy Marples
2f3ffd053f
We should use shutdown to goto single user mode.
2008-03-01 10:38:47 +00:00
Roy Marples
483a19a0e3
exiting to shell should block signals first, to avoid the child getting them. Also, sulogin seems to work without specifying the terminal now.
2008-02-04 22:19:40 +00:00
Roy Marples
ad04517623
Block signals to avoid fork /signal races.
2008-02-02 00:17:35 +00:00