Commit Graph

80 Commits

Author SHA1 Message Date
43063ae7c2 Fix compile on NetBSD and FreeBSD 2009-05-05 10:24:21 +01:00
658a220638 Add (c) to Copyright 2009-05-01 15:11:40 +01:00
f689187966 Add -Z, --dry-run option to show which services we would start/stop
without actually doing so.
Fixes #151.
2009-04-30 23:42:01 +01:00
3d0e5175d8 Avoid more gcc warning about not checking return values ... 2009-04-30 19:56:43 +01:00
a1e40e9beb Fix parens 2009-04-30 16:45:18 +01:00
e0f0fc8046 Don't start services when their need dependency is broken 2009-04-28 08:29:02 +00:00
5276b13926 Cast to int 2009-04-24 08:32:44 +00:00
e643a7fdd5 Describe interval units 2009-04-24 06:37:29 +00:00
ade85d4bd8 Improve style for KNF 2009-04-23 21:31:22 +00:00
7dc9c39503 Improve the service timeout code and reduce the timeout to 60 seconds.
Don't process any dependencies when changing runlevels and called 
outside of RC otherwise we can deadlock.
2009-04-23 20:20:17 +00:00
3579663173 Don't leak the lock fd. 2009-04-18 19:54:04 +00:00
657cb3a6eb Fix compile on FreeBSD. 2009-04-18 00:57:17 +00:00
c9e24a0494 Move status to runscript.sh so init scripts can override it, #159
Return 32 if crashed, #163
2009-04-18 00:09:03 +00:00
ee54bb9372 Using fifos for locking can be error prone.
flocks are safer, as we only use tmpfs for our lock files.

I don't know how this works for inactive just yet though ...
2009-04-17 22:55:11 +00:00
5208a1de29 yes should be YES 2009-01-13 11:04:37 +00:00
3d37005a3d We now warn about clock skews
rc-update -u will force a regen of the dep tree
rc_newer_than and rc_olderthan now take another two parameters for newest/oldest file and mtime
2009-01-12 23:53:13 +00:00
7ad40abf64 Our error messages don't have full stops at the end 2008-12-23 10:42:25 +00:00
7e12abe035 Typo. 2008-12-23 10:41:33 +00:00
4dba5b1ff1 Disallow hotplug to run during sysinit, but allow elsewhere. Fixes #131. 2008-12-23 10:40:27 +00:00
6bf0289f33 Warn about stopping sysinit services, thanks to Matthias Schwarzott. Fixes #126. 2008-12-11 14:50:58 +00:00
e84f71596e Not needed. 2008-11-27 21:14:52 +00:00
2537a07e10 Switch from select to poll and improve the no prefixing of eend calls. 2008-11-27 21:05:39 +00:00
fe12134a5b Don't warn about waiting for services marked as notimeout, Gentoo #247306. 2008-11-23 18:40:43 +00:00
0af7d5bc20 Add a new shutdown runlevel, Gentoo #224537.
Split halt.sh into halt, killprocs, romount and savecache services.
The reboot runlevel is removed but mapped to shutdown.
The halt script should be moved to the sysvinit package.
2008-11-03 15:31:01 +00:00
1c73f2967c We no longer hotplug by default. 2008-10-30 15:03:12 +00:00
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
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
8c8751fa60 Clean up warnings regarding printf. 2008-10-08 15:56:47 +00:00
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
bb41d2cc80 Use flock to lock PREFIX_LOCK so that multiple processes can cleanly write to the same tty. 2008-09-27 18:50:21 +00:00
4291b9140e Warn when waiting for a service every few seconds. 2008-09-27 17:17:15 +00:00
354fb96ee9 Use the new rc_stringlist_find function. 2008-09-18 15:36:22 +00:00
80a17eb596 Clean up some compile warnings. 2008-09-18 13:09:51 +00:00
9b1cb4e246 When we have dependant scheduled services, don't error if a need is stopped. 2008-06-10 15:04:29 +00:00
f13ea77491 The real fix for the last commit is to uncomment some code - d'oh. 2008-05-12 23:33:40 +00:00
a89171ee9b When stopping, stop services that need our provide as well, #79. 2008-05-12 23:17:45 +00:00
d667da8e5c Check we have a deptree before using it, Gentoo #220579 2008-05-12 13:20:35 +00:00
50cff8ebc8 Tweak the last commit and fix a valgrind error. 2008-04-29 10:49:50 +00:00
5ba6f0a628 We need to ensure that the init script started is correct, translating symlinks. This has a new rule - multiplexed services must exist in the same dir as the master sript. So we need to ensuret that net.lo(0) is the real script and not a symlink itself. This fixes Gentoo #219526. 2008-04-29 10:25:45 +00:00
e499e58310 Don't re-start or re-stop failed services if runlevel is changing. 2008-04-27 21:04:37 +00:00
b5d829789f Check we have a list before running depends. 2008-04-26 14:57:39 +00:00
54d7aa39dd If we don't have permission to inspect the pidfile, don't report crashed. Gentoo #218028. 2008-04-21 10:56:28 +00:00
8759735711 Give an error when running zap as a generic user. 2008-04-08 22:57:42 +00:00
143239e143 Increase pidstr size to 10 chars. 2008-04-06 13:24:10 +00:00
c18c4fc4cc Check list existance before iterating, Gentoo #216091. 2008-04-04 16:31:56 +00:00
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
15d34d0a16 Add license blurb to a few files and append my email to my name. 2008-03-26 17:53:37 +00:00
a4f9eb699b Fix some crashers in a prefix with few services. 2008-03-21 20:02:10 +00:00
f7f3b6ae09 euid 0 should always be able to find pids too. 2008-03-21 17:41:01 +00:00
85a6addd23 Only test crashed services if we can see pid 1. 2008-03-21 13:04:29 +00:00