Doug Freed
3adb8fb389
rc-logger: refuse to cat TMPLOG into itself
...
This prevents an infinite loop in case somebody decides to set
rc_log_path to match TMPLOG.
2016-07-24 02:27:53 +00:00
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
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
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
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
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
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
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
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
William Hubbs
b81317bdf8
mountinfo: make sure the netdev variable is initialized on Linux
...
This fixes the following regression:
X-Gentoo-Bug: 562668
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=562668
2015-10-13 08:27:43 -05:00
William Hubbs
5f4f242036
mountinfo: fix --netdev and --nonetdev on Linux
...
On Linux, the --netdev and --nonetdev switches were not working. They
were both returning false. After this change, they operate based on the
presence or abscence of the _netdev option in mount options.
2015-10-05 10:18:00 -05:00
William Hubbs
b3f7ff901f
mountinfo: read /proc/self/mounts instead of /proc/mounts on Linux
2015-10-04 15:35:33 -05:00
William Hubbs
3b6a6df4b5
openrc-run: rename some dependency variables and a function for clarity
...
All of the dependency type lists had the types_ prefix in their names;
this has been changed to deptypes_ to make them more self documenting.
Along the same lines, the setup_types function was renamed
setup_deptypes.
2015-09-17 15:02:30 -05:00
William Hubbs
f69833a1e1
mountinfo: fix -e and -E options
...
Add the -e and -E options to getoptstring so they are recognized.
2015-08-02 07:39:58 -05:00
William Hubbs
eeadca0b8a
Add EERROR_QUIET and EINFO_QUIET to environment whitelist
2015-07-23 12:44:10 -05:00
William Hubbs
8b93492086
convert all references from runscript to openrc-run
2015-04-27 11:21:29 -05:00
William Hubbs
03803ae8e9
start-stop-daemon: redirect stdin if --background option is used
...
X-Gentoo-Bug: 498684
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=498684
2015-04-24 12:24:09 -05:00
William Hubbs
b8ab99b5d3
checkpath: Remove the last HAVE_SELINUX test
2015-03-25 08:33:42 -05:00
William Hubbs
a4cf61e8bf
selinux: unconditionally include the header and provide stub methods
...
If selinux is disabled, then stub methods will be provided instead of
calling the real methods. This removes some warnings about unused
parameters which used to be covered up with #ifdef HAVE_SELINUX.
Signed-off-by: Jason Zaman <jason@perfinion.com>
2015-03-25 01:01:38 -05:00