Commit Graph

2686 Commits

Author SHA1 Message Date
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
Rick Farina (Zero_Chaos)
c45313dfa9 netmount: use want dependency to start nfsclient
add in parsing of fstab to determine if nfsclient should be automatically
started so that netmount can mount nfs without adding nfsclient
to the default runlevel

This fixes #71.
2015-12-11 13:56:03 -06:00
William Hubbs
3ef2bbfb19 Add note about deprecating rc_getline() 2015-12-09 17:57:20 -06:00
William Hubbs
cc9c23c848 Complete support for rc.conf.d
- gendepends.sh needs to read this directory to allow dependencies to be
  overridden
  - init.sh for Linux and Bsd need to read it to allow config settings
    they use to be overridden.
2015-12-09 12:38:10 -06:00
William Hubbs
935252b115 Add note about removing rc_sys() from librc 2015-12-08 13:11:41 -06:00
William Hubbs
0d202b5711 Update feature-removal-schedule wrt mtab service 2015-12-08 13:02:26 -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
a67e3495d0 Increment version number 2015-12-05 10:31:39 -06:00