aboutsummaryrefslogtreecommitdiff
path: root/src/includes/rc-misc.h
AgeCommit message (Collapse)Author
2021-12-20use HEAD in git URIs to point to the default branchMike Frysinger
This makes the URIs shorter and dynamic: whatever the default branch the repo uses will be used.
2018-05-18Remove the _rc_can_find_pids functionWilliam Hubbs
This test to find if we could see pid 1 was being used inconsistently in rc-status and mark_service_crashed to decide whether we could test to see if the daemon for the service was crashed, and it was not part of the librc library. I am removing it from the executables because of inconsistent usage. I will add it to the library if it is needed there.
2017-10-24supervise-daemon: multiple fixesWilliam Hubbs
- Harden against dying by handling all signals that would terminate the program and adding --reexec support - factor the supervisor into its own function - fix test for whether we are already running
2017-08-23move get_pid function to a shared fileWilliam Hubbs
2017-05-11fix from_time_t functionWilliam Hubbs
2017-05-11Move time_t conversions to rc-misc.c so they can be sharedWilliam Hubbs
2016-01-19librc: move system detection code into rc_sys and use itDoug Freed
This fixes an issue where librc code was calling code that only existed in the rc binary. This reverts commits 8addd79 and 9f6e056 This fixes #75.
2016-01-18Revert "rc: make get_systype similar to the old rc_sys function"William Hubbs
This reverts commit f79a7a7be18d68bf264efc60d82838d03048da6b.
2016-01-18rc: make get_systype similar to the old rc_sys functionWilliam Hubbs
2016-01-14include rc.h properly in source filesWilliam Hubbs
We were attempting to include rc.h in rc-misc.h instead of the source files where it should be included.
2016-01-12Remove multicall binary structure from OpenRCWilliam Hubbs
This eliminates the need for the selinux-specific wrapper scrript we were installing in /lib*/rc/{bin,sbin}.
2016-01-05rc: fix compiler warnings cleanupWilliam Hubbs
This reverts commit 981d2b3308edb0d0a68f7bdce4f2c99110de6940 and fixes the warnings that generated.
2016-01-01rc: clean up compiler warningsWilliam Hubbs
The get_systype(), detect_container(), detect_prefix() and detect_vm() functions need to return "char *" instead of "const char *".
2015-12-21Convert OpenRC to a centralized copyright/license structureWilliam Hubbs
In the past, OpenRC was a hybrid of a centralized and file-scope license/copyright structure. I followed the instructions from the Software Freedom Law Center [1] to convert to a Centralized structure where possible, for easier future maintenance. [1] https://softwarefreedom.org/resources/2012/ManagingCopyrightInformation.html
2015-12-08Create detect_container() and detect_vm() functionsWilliam Hubbs
These functions replace rc_sys so that we can detect containers and vms separately. Also, we copy file_regex() to rc-misc.c and open it to all operating systems.
2012-05-06split out librc-independent helpers into a dedicated header fileMike Frysinger
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-01-26Add is_writable() function to check whether a path is writable or notChristian Ruppert
2011-06-29drop useless "All rights reserved" noticeMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-10-13Add new utility and init script swclock that sets the system time based onRoy Marples
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-05-01Add (c) to CopyrightRoy Marples
2009-04-23StyleRoy Marples
2009-04-17Using fifos for locking can be error prone.Roy Marples
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-01-12Use snprintf instead of strlcpy to save on size if not available.Roy Marples
2008-10-10sysinit is now a real runlevel that handles things like udev, dmesg andRoy Marples
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-09-18Clean up some compile warnings.Roy Marples
2008-08-20Add -k,--umask option, Gentoo #232455.Roy Marples
2008-07-07Punt STAILQ and just use TAILQ so we're a bit more portable.Roy Marples
2008-03-28Put some dir locations in rc.h so that 3rd party apps can become awware of them.Roy Marples
2008-03-28Remove rc_service_start/stop from librc as they block and unmask signals. ↵Roy Marples
The application may not wish this behaviour and should fork/exec the service itself.
2008-03-26Add license blurb to a few files and append my email to my name.Roy Marples
2008-03-25Try and fix more prefix stuff.Roy Marples
2008-03-19Add rc-service and update all softlevel refs to runlevel.Roy Marples
2008-03-16Use correct TAILQ_CONCAT macro when not defined.Roy Marples
2008-03-16Remove null terminated char ** lists in favour of RC_STRINGLIST, using TAILQ ↵Roy Marples
from queue(3). Refactor code style around the BSD KNF.
2008-03-05Add tunable SYSCONFDIRRoy Marples
2008-03-03rc single and rc sysinit don't check sysvinit env vars in prefix.Roy Marples
2008-03-03Introduce LOCAL_PREFIX for a user maintained script location.Roy Marples
2008-03-03Fix prefix test.Roy Marples
2008-02-28Support the use of PREFIX and PKG_PREFIX.Roy Marples
2008-02-22Welcome to 2008.Roy Marples
2008-02-22More PCC fixes.Roy Marples
2008-02-20Support the PCC compiler.Roy Marples
2008-02-02Block signals to avoid fork /signal races.Roy Marples
2008-02-01Use sigaction over signal.Roy Marples
2008-01-22Quiet some lint warnings.Roy Marples
2008-01-22Define our x* functions as unused rather than inline for a massive space saving.Roy Marples
2008-01-15rc_newer_than no longer tests if souce has data, making it a more logical ↵Roy Marples
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-14strip trailing newlinesMike Frysinger
2008-01-13Remove rc_service_plugable function and make it private as it needs to read ↵Roy Marples
from our config file.
2008-01-10Allow for OS and SUBOS folders so we can introduce NetBSD scripts whilst ↵Roy Marples
keeping BSD for all BSD's.