aboutsummaryrefslogtreecommitdiff
path: root/src/rc/rc.c
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.
2021-12-20drop unused copyright variablesMike Frysinger
The existing copyright notices in the file headers cover these vars.
2021-12-20change getopt definition to elide pointer storageMike Frysinger
Make this a const pointer to the storage directly instead of a pointer variable that points to the storage. Makes the code slightly smaller.
2021-11-12Added missing comma in openrc/src/rcEric Turgeon
Clang was failing with: ``` /zroot/jenkins/workspace/update_ghsotbsd-13_poudriere_jail/sbin/openrc/../../contrib/openrc/src/rc/rc.c:70:2: error: suspicious concatenation of string literals in an array initialization; did you mean to separate the elements with a comma? [-Werror,-Wstring-concatenation] "when leaving single user or boot runlevels", ^ /zroot/jenkins/workspace/update_ghsotbsd-13_poudriere_jail/sbin/openrc/../../contrib/openrc/src/rc/rc.c:69:2: note: place parentheses around the string literal to silence warning "override the next runlevel to change into\n" ^ ``` This fixes #469.
2019-07-24Fix build with ClangMartin Wilke
This fixes #313.
2018-06-20openrc: convert snprintf calls to xasprintfWilliam Hubbs
2018-02-26openrc: remove unused #define's.William Hubbs
2018-02-26openrc: convert another execl() call to execlp()William Hubbs
2018-02-22openrc: force deptree update for sysinit runlevelWilliam Hubbs
2018-02-21rc.c: remove PATH_MAX referencesWilliam Hubbs
2016-11-01src/rc/rc: do not try to start services if fork failsWilliam Hubbs
2016-09-19Revert "Disable parallel startup in interactive mode"William Hubbs
This reverts commit 8b4fc05ff2645b2ecb0f153492f72dd8b39ba431. The original commit did not explain why this feature was disabled, and I now have a request to enable it. This fixes #24.
2016-07-16rc: Rename some static variables to kill warningsDoug Freed
2016-07-14Remove the DEBUG_MEMORY macroWilliam Hubbs
This fixes #43.
2016-05-24Make deprecation warnings for rc and runscript more visibleWilliam Hubbs
These warnings were inserted in verbose only mode in OpenRC-0.13.A Now, we are making them more visible in preparation for removing these compatibility binaries in the future.
2016-01-22add back deprecation warnings lost during refactoringWilliam Hubbs
2016-01-22fix testsWilliam Hubbs
X-Gentoo-Bug: 572602 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=572602
2016-01-19rc: remove use of magic constant and allow OpenVZ to drop to shellDoug Freed
OpenVZ has had console support for a long time now; allow them to use it to drop to a shell during interactive boot.
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-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-08Convert rc_sys() calls to detect_container() and detect_vm()William Hubbs
2015-12-02Use systype variable for rc_sys callWilliam Hubbs
2015-11-12Implement "want" dependencyIan Stakenvicius
The want dependency is similar to the use dependency. If a service script, for example called service1, adds "want service2" to its depend function, OpenRC will attempt to start service2, if it exists on the system, when service1 is started. However, service1 will start regardless of the status of service2. X-Gentoo-Bug: 406021 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=406021
2015-03-24Fix some compiler warningsDoug Freed
librc: Fix C90 warning (mixed declaration and code) rc: Fix warning about discarding const qualifier Fixes #45.
2014-10-23Bundle <sys/queue.h> from NetBSDAnthony G. Basile
We are bundling this to allow building on musl-based systems since musl does not include <sys/queue.h>.
2013-12-12Rename the rc binary to openrcWilliam Hubbs
Debian requested this rename due to the "rc" binary conflicting with the "rc" binary from the plan 9 shell. We also add a deprecation warning to the binary when it is run as rc to encourage users to switch to openrc instead. X-Gentoo-Bug: 493958 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=493958
2013-09-23style fixesWilliam Hubbs
2013-09-20Fix stacked runlevel supportAlexander V Vershilov
Patch was provided by Max Hacking <max.gentoo.bugzilla@hacking.co.uk> and slightly fixed by Alexander Vershilov <qnikst@gentoo.org> and William Hubbs <williamh@gentoo.org>. Fixes: 1). Rebase to newest OpenRC version. 2). Remove code style fixes. Port to currect code style. 3). Fix rc_runlevel_stack instead of introducing new function. 4). Make get_runlevel_chain a private function. X-Gentoo-Bug: 467368 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=467368
2013-04-28rc: allow switching runlevels without stopping servicesWilliam Hubbs
OpenRC, by default, stops all services that are not listed in a runlevel when rc is used to switch runlevels. This adds a -n/--no-stop command line option to rc which tells it to skip stopping the services which are not in the runlevel. Reported-by: gentoo@thoth.purplefrog.com X-Gentoo-Bug: 372585 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=372585
2013-02-25rc: add usage messageAndrew Gregory
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2012-03-26librc: Do not output error messages from within the library.William Hubbs
This fixes a compile issue. Also, it is cleaner to have the client output error messages as opposed to having the library do this. Reported-by: Ewoud Kohl van Wijngaarden <gentoo@kohlvanwijngaarden.nl> X-Gentoo-Bug: 409743 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=409743
2012-02-20rc: remove calls to rc_sys_v2 and rc_sys_v1William Hubbs
These separate calls are no longer needed since we do not warn about falling back to automatic detection.
2012-02-20remove the warning about falling back to autodetectionJory A. Pratt
2012-02-12Use size_t instead of intChristian Ruppert
2012-02-11Remove unused/useless function single_user()Christian Ruppert
2012-01-24Disable parallel startup in interactive modeChristian Ruppert
2012-01-15Rename proc_getent to rc_proc_getent and make it globalChristian Ruppert
2011-12-30Code style fixesChristian Ruppert
2011-12-30Compare stricter in proc_getentChristian Ruppert
The new proc_getent compares stricter so that e.g. "ro" doesn't match root=/dev/sdaN anymore. So it has to be either "ro" or "ro=".
2011-06-29drop useless "All rights reserved" noticeMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-05-28rc: delete now unused local "i" variableMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-02-16new implementation of applet optionWilliam Hubbs
This reworks the implementation of the --applet option so that it is processed in run_applets() and does not require two calls to the getopts_long() function. It is based on code by Robin Johnson and Chris Richards. X-Gentoo-Bug: 351712 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=351712
2011-02-14make version option commonWilliam Hubbs
This reworks the code for the version option so that it is part of the parser loop and is a common option to all applets.
2011-01-17Style fix: "if (" not "if(".Robin H. Johnson
2011-01-17Better error checking of argc for --applet call.Robin H. Johnson