William Hubbs
695be59083
rc-status: add -m/--manual option to show manually started services
...
X-Gentoo-Bug: 585906
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=585906
2016-07-18 13:20:56 -05:00
Doug Freed
c962678dd6
rc: Rename some static variables to kill warnings
2016-07-16 20:10:37 +00:00
William Hubbs
3a1262703f
Remove the DEBUG_MEMORY macro
...
This fixes #43 .
2016-07-14 16:52:57 -05:00
William Hubbs
20035210bd
make variable aflag a boolean show_all
2016-07-14 12:13:17 -05:00
Jaromil
7f84b5d741
libeinfo: document the x suffix on function names
...
This fixes #88 .
2016-07-13 17:04:28 -05:00
William Hubbs
b2c92b88cc
fstabinfo/mountinfo: ensure /etc/fstab exists before calling setmntent
...
This is based on a patch by A. Wilcox <awilfox.gentoo@foxkit.us>.
X-Gentoo-Bug: 478226
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=478226
X-Gentoo-Bug: 478226
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=478226
2016-06-10 17:16:37 -05:00
William Hubbs
87884db667
Make deprecation warnings for rc and runscript more visible
...
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-05-24 11:24:10 -05:00
William Hubbs
94077d264e
supervise-daemon: log the exit code or signal when a child process dies
2016-05-23 11:10:51 -05:00
Jason Zaman
3fa9015b8e
rc-selinux: access check was backwards
2016-05-13 12:52:21 -05:00
William Hubbs
3b5a8b331e
supervise-daemon: add pam service file
2016-05-13 12:05:23 -05:00
William Hubbs
ad23d5b8db
openrc-run: clean up runscript deprecation message
2016-05-04 18:17:58 -05:00
William Hubbs
62410eaf4b
add daemon supervisor
...
The supervise-daemon process is meant to be a lightweight supervisor
which can monitor and restart a daemon if it crashes.
2016-04-27 11:13:50 -05:00
Mike Gilbert
171e856ec8
start-stop-daemon: Allow group read/write when creating output files
...
This allows for better interaction with inherited ACL entries.
This fixes #84 .
X-Gentoo-Bug: 577362
X-Gentoo-Bug-URL: https://bugs.gentoo.org/577362
2016-04-11 11:11:59 -05:00
William Hubbs
7eaf71176b
Fix rc_env_allow wildcard usage
...
Before this commit, using * in rc_env_allow did not work.
This fixes #60 .
2016-02-12 12:44:52 -06:00
William Hubbs
8a7e4d38a7
rc-service: add --ifinactive and --ifnotstarted flags
...
X-Gentoo-Bug: 523174
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=523174
2016-01-28 12:57:11 -06:00
William Hubbs
47dd5e37cb
add back deprecation warnings lost during refactoring
2016-01-22 12:46:29 -06:00
William Hubbs
e277ae57ef
fix tests
...
X-Gentoo-Bug: 572602
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=572602
2016-01-22 12:07:13 -06:00
William Hubbs
69f052b611
librc: Complain when a real and virtual service have the same name
2016-01-21 15:58:03 -06:00
William Hubbs
e4eacf02ca
openrc-run: in verbose mode, log execution of the shell script
...
This is to show when openrc-run runs the openrc-run.sh script; it is
used for debugging.
2016-01-20 11:20:40 -06:00
Doug Freed
62b49b2a3a
rc: remove use of magic constant and allow OpenVZ to drop to shell
...
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-19 00:09:20 -06:00
Doug Freed
4c814a0a28
librc: handle rc_sys="prefix" even if we weren't built with a prefix
...
This probably isn't needed, but it mimics old behavior.
2016-01-19 00:09:20 -06:00
Doug Freed
36dde4e7f2
librc: fix handling the nothing special case for rc_sys
2016-01-19 00:09:20 -06:00
Doug Freed
649f63d882
librc: move system detection code into rc_sys and use it
...
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-19 00:09:20 -06:00
William Hubbs
55a28f5d25
Revert "rc: make get_systype similar to the old rc_sys function"
...
This reverts commit f79a7a7be18d68bf264efc60d82838d03048da6b.
2016-01-18 23:40:20 -06:00
William Hubbs
6c09421375
Revert "librc: fix librc-depend functions to call rc_sys"
...
This reverts commit 73482cf13a338051606788957cbd0031ac850c70.
2016-01-18 23:40:03 -06:00
William Hubbs
79359f77cc
fix bsd build
...
X-Gentoo-Bug: 572068
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=572068
2016-01-18 16:06:39 -06:00
William Hubbs
f79a7a7be1
rc: make get_systype similar to the old rc_sys function
2016-01-18 15:50:59 -06:00
William Hubbs
73482cf13a
librc: fix librc-depend functions to call rc_sys
2016-01-18 15:09:31 -06:00
William Hubbs
0910c455d3
src/rc/Makefile: fix make depend target
2016-01-14 13:33:05 -06:00
William Hubbs
f5e06bc55a
include rc.h properly in source files
...
We were attempting to include rc.h in rc-misc.h instead of the source
files where it should be included.
2016-01-14 12:52:32 -06:00
William Hubbs
6da0abc085
fix selinux build
...
X-Gentoo-Bug: 571798
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=571798
2016-01-14 11:29:24 -06:00
William Hubbs
b34df9dd81
fix selinux build
2016-01-13 20:11:06 -06:00
William Hubbs
6f02069746
Add LANG, LC_MESSAGES and TERM to the environment whitelist
2016-01-13 19:34:22 -06:00
William Hubbs
d4c7207ef3
fix seg fault
2016-01-13 19:30:19 -06:00
William Hubbs
bf2f40828e
Remove multicall binary structure from OpenRC
...
This eliminates the need for the selinux-specific wrapper scrript we
were installing in /lib*/rc/{bin,sbin}.
2016-01-12 10:42:14 -06:00
William Hubbs
fe485f4433
rc: fix compiler warnings cleanup
...
This reverts commit 981d2b3308edb0d0a68f7bdce4f2c99110de6940 and fixes
the warnings that generated.
2016-01-05 01:05:00 -06:00
William Hubbs
53bc986ce5
Clean default env_whitelist
...
The whitelist of environment variables we pass to service scripts
included several unnecessary variables.
The default whitelist now includes EERROR_QUIET, EINFO_QUIET,
IN_BACKGROUND and IN_HOTPLUG.
X-Gentoo-Bug: 569542
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=569542
2016-01-04 15:14:15 -06:00
William Hubbs
981d2b3308
rc: clean up compiler warnings
...
The get_systype(), detect_container(), detect_prefix() and detect_vm()
functions need to return "char *" instead of "const char *".
2016-01-01 13:13:28 -06:00
William Hubbs
000503fad7
Convert OpenRC to a centralized copyright/license structure
...
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-21 12:16:06 -06:00
William Hubbs
065f034059
format fix
2015-12-14 11:37:39 -06:00
William Hubbs
f9bdb072e8
rc.map: remove references to rc_sys_v{1,2}
2015-12-08 12:50:47 -06:00
William Hubbs
9f6e05671d
Convert rc_sys() calls to detect_container() and detect_vm()
2015-12-08 12:09:33 -06:00
William Hubbs
8addd7913a
Create detect_container() and detect_vm() functions
...
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.
2015-12-08 12:05:59 -06:00
William Hubbs
83cd7145e3
Rename bootlevel variable in _usage.c
...
In src/rc/_usage.c, we were using bootlevel as the variable to hold the
return value of rc_sys.
This changes the variable name to systype because this function returns
a system type, not a runlevel.
2015-12-05 17:47:47 -06:00
William Hubbs
f5cf1136e7
Use systype variable for rc_sys call
2015-12-02 15:44:35 -06:00
William Hubbs
a0cf8f9124
Add detection for rkt containers
2015-12-02 10:20:39 -06:00
William Hubbs
9fedb3b40b
Add detection for docker containers
2015-12-02 10:20:15 -06:00
William Hubbs
635e33cdc8
librc: comsolidate rc_sys_v1 and rc_sys_v2 into rc_sys
...
These functions were never meant to be used outside of OpenRC, and they
were added when we thought we were going to do away with the automatic
detection of subsystems. Since the autodetection is not going away, we
can combine these functions into rc_sys.
2015-12-01 17:39:04 -06:00
Ian Stakenvicius
33d3f33b3c
Implement "want" dependency
...
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-11-12 12:32:45 -06:00
Benda Xu
085d77f17e
Standardize macro tests for gnu hurd
...
This also fixes breakage of GNU/hurd builds introduced by commit 3f82edbeb92.
2015-11-11 13:37:41 -06:00