Mike Frysinger
0813a80223
add a new ARRAY_SIZE macro and use it
...
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-05-06 01:17:30 -04:00
Mike Frysinger
3969cb2a85
split out librc-independent helpers into a dedicated header file
...
Many of these helpers are not special to librc, so split them out so they
can be used in all source trees (including libeinfo).
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-05-06 01:17:30 -04:00
Christian Ruppert
44019f6542
Add is_writable() function to check whether a path is writable or not
2012-01-26 20:46:31 +01:00
Mike Frysinger
d0bc4f20ad
drop useless "All rights reserved" notice
...
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-06-29 19:46:31 -04:00
Roy Marples
a8f6a9b654
Add new utility and init script swclock that sets the system time based on
...
the mtime of a file. It saves the shutdown time to this file also.
This is handy for systems without a working RTC chip.
Based on an idea by Michael A. Smith <michael@smith-li.com>.
Fixes Gentoo #272073 .
2009-10-13 08:03:45 +01:00
Roy Marples
658a220638
Add (c) to Copyright
2009-05-01 15:11:40 +01:00
Roy Marples
6953474655
Style
2009-04-23 20:53:24 +00:00
Roy Marples
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
Roy Marples
8a9a2d5fe9
Use snprintf instead of strlcpy to save on size if not available.
2009-01-12 08:31:03 +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
80a17eb596
Clean up some compile warnings.
2008-09-18 13:09:51 +00:00
Roy Marples
1ab1e9328a
Add -k,--umask option, Gentoo #232455 .
2008-08-20 10:02:11 +00:00
Roy Marples
7a6112d3b0
Punt STAILQ and just use TAILQ so we're a bit more portable.
2008-07-07 14:16:46 +00:00
Roy Marples
ee4e861796
Put some dir locations in rc.h so that 3rd party apps can become awware of them.
2008-03-28 10:46:12 +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
5866d829bb
Try and fix more prefix stuff.
2008-03-25 18:33:45 +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
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
a689b66023
Add tunable SYSCONFDIR
2008-03-05 12:27:11 +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
0aedc02860
Introduce LOCAL_PREFIX for a user maintained script location.
2008-03-03 10:33:42 +00:00
Roy Marples
c67c283b2a
Fix prefix test.
2008-03-03 08:06:53 +00:00
Roy Marples
f092045650
Support the use of PREFIX and PKG_PREFIX.
2008-02-28 11:08:49 +00:00
Roy Marples
ad780077d2
Welcome to 2008.
2008-02-22 12:07:34 +00:00
Roy Marples
a9fcbf3e30
More PCC fixes.
2008-02-22 11:44:10 +00:00
Roy Marples
405cea1f19
Support the PCC compiler.
2008-02-20 18:06:01 +00:00
Roy Marples
ad04517623
Block signals to avoid fork /signal races.
2008-02-02 00:17:35 +00:00
Roy Marples
f2ce40d90b
Use sigaction over signal.
2008-02-01 13:20:19 +00:00
Roy Marples
b4bff9ce5e
Quiet some lint warnings.
2008-01-22 10:29:15 +00:00
Roy Marples
cbe5648158
Define our x* functions as unused rather than inline for a massive space saving.
2008-01-22 09:35:42 +00:00
Roy Marples
3e0f49b846
rc_newer_than no longer tests if souce has data, making it a more logical function. As such, we add the existss function to check for existance and size when checking to see if the deptree needs an update.
2008-01-15 09:24:50 +00:00
Mike Frysinger
6aab712cb4
strip trailing newlines
2008-01-14 05:05:22 +00:00
Roy Marples
87e4e4410c
Remove rc_service_plugable function and make it private as it needs to read from our config file.
2008-01-13 17:47:23 +00:00
Roy Marples
4314784520
Allow for OS and SUBOS folders so we can introduce NetBSD scripts whilst keeping BSD for all BSD's.
2008-01-10 16:35:59 +00:00