Commit Graph

2796 Commits

Author SHA1 Message Date
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
Anthony G. Basile b3a04e797e runlevels/Makefile: add support for runlevel ‘nonetwork’
Traditional System V reserves runlevel 2 for multiuser with no
networking.  We add support for this which is already defined in
the inittab as

    l2:2:wait:/sbin/rc nonetwork

X-Gentoo-Bug: 533828
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=533828

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2016-05-12 17:49:56 -04:00
William Hubbs 92e2f2c7cc killprocs: remove calls to sleep
X-Gentoo-Bug: 487084
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=487084
2016-05-05 17:02:39 -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
William Hubbs fd80b6fc67 localmount/netmount: clean up critical mount processing
Fix a typo and do not fail if a path in critical_mounts is not listed as
a critical mount does not get mounted.
2016-04-26 12:43:50 -05:00
William Hubbs 5d130cc45c localmount/netmount: allow mount points to be marked critical
In previous releases, we either treated no mount points as critical or
all of them.

Now both localmount and netmount support a critical_mounts setting. If
mount points listed in this setting fail to mount, localmount and
netmount will fail.
2016-04-25 12:04:34 -05:00
William Hubbs 1c3c2cf6d8 netmount: fix mounting on Linux
Before this commit, on Linux, we were always trying to mount file
systems marked with _netdev, even when the previous mount command
failed. Now, we do not run the second mount if the first fails.

X-Gentoo-Bug: 579876
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=579876
2016-04-15 11:30:44 -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
Dustin C. Hatch beaa71df0a binfmt.sh: use read in raw mode
The read builtin in most shells will interpret backslash characters
as escapes, and they are lost when reading binfmt files line-by-line.
This causes magic strings containing backslashes to be mangled and
become invalid, resulting in erroneous 'invalid entry' messages.

The -r option to read disables special handling of backslashes and
keeps all lines intact.

X-Gentoo-Bug: 575114
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=575114
2016-02-19 15:25:53 -06: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
Mike Frysinger 2c1f6a16e1 sysfs: mount pstore when available 2016-02-09 15:39:43 -06:00
Patrick Lauer e82653782e Add a basic OpenRC users guide
X-Gentoo-Bug: 513024
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=513024
2016-02-09 15:30:46 -06:00
William Hubbs e52b5f59c2 savecache: stop saving nettree
Netifrc is no longer part of OpenRC, so we shouldn't save its dep tree
as part of savecache.

This should have been removed when netifrc was split out. also, it
might be related to the following bug.

X-Gentoo-Bug: 563720
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=563720
2016-01-28 17:06:25 -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
Colin Booth 30c3561b6b sh/s6.sh: update s6-svc syntax to be valid for 2.2.0.0+
The s6-svc syntax changed for wait-up, wait-ready, wait-down, and
wait-finished. This changes the s6 handling script to use the current
valid syntax.

This fixes #65.
2016-01-19 16:52:58 -06:00
Manuel Rüger 5f2850366e Fix typo
This fixes #70.
2016-01-19 16:30:41 -06:00
Gokturk Yuksek 1cb7eec31f conf.d/bootmisc: typo fix: s/dmesc/dmesg/
This fixes #72.
2016-01-19 16:22:34 -06:00
William Hubbs cd7883d25d localmount: Allow users to control whether errors are ignored
X-Gentoo-Bug: 572138
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=572138
2016-01-19 13:34:04 -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 f79a7a7be1.
2016-01-18 23:40:20 -06:00
William Hubbs 6c09421375 Revert "librc: fix librc-depend functions to call rc_sys"
This reverts commit 73482cf13a.
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 e7ae08c38d version 0.21 2016-01-14 11:35:18 -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 04f05c30d1 update ChangeLog 2016-01-13 11:01:41 -06:00
joe9 9473ac514c allow the user to decide whether fsck aborts for errors
X-Gentoo-Bug: 564008
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=564008
2016-01-13 10:52:22 -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 981d2b3308 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 5d3e85bc31 add ignore patterns for init.d directory 2016-01-01 09:19:49 -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 fe32ef8e09 FEATURE-REMOVAL-SCHEDULE: create section for librc API functions 2015-12-11 16:48:40 -06:00