Compare commits

..

33 Commits

Author SHA1 Message Date
William Hubbs
5534b22c63 update ChangeLog 2017-03-23 17:50:51 -05:00
William Hubbs
477e3dd8c1 sh/gendepends.sh.in: fix detection of service scripts
We do not need to care about the path on the shebang line of a service
script as long as the shebang line ends with "openrc-run".
This fixes #119 and #120.
2017-03-23 13:46:18 -05:00
William Hubbs
678e7adeb2 version 0.24.2 2017-03-23 13:34:31 -05:00
William Hubbs
b087a751de update ChangeLog 2017-03-14 19:58:26 -05:00
William Hubbs
bc05fb7551 update news file 2017-03-14 19:36:32 -05:00
William Hubbs
e5c2a378f3 Remove all occurances of 'before *' from dependencies
Using wildcards in dependencies causes issues when rc_parallel is set to
yes because it can lead to deadlocks.
All dependencies need to be explicit rather than implicit.

This is the first stage of moving this direction.
2017-03-14 19:36:01 -05:00
William Hubbs
3c1a71bd9d init.d/sysfs.in: efivarfs tweaks
Since we check for /sys/firmware/efi/efivars, we do not need to check
for /sys/firmware/efi

Since Failing to mount efivarfs is not critical, we silence the error
message from mount.
2017-03-14 19:35:51 -05:00
William Hubbs
fcb826a451 version 0.24.1 2017-03-14 19:35:35 -05:00
William Hubbs
fde3902d06 update ChangeLog 2017-03-09 16:20:17 -06:00
William Hubbs
d7bbb0f583 add agetty service
The agetty service is an alternate way to manage gettys with agetty
under Linux which is separate from an external init system.
2017-03-09 15:23:02 -06:00
William Hubbs
21ca2b746c init.d/sysfs: drop modules completely from the dependencies
This is for #112.
2017-03-08 10:44:10 -06:00
William Hubbs
6a79aef015 init.d/sysfs: Do not load efivarfs module
My understanding is that the kernel can autoload this module. If it
doesn't, the module should be built in or loaded from an initramfs.

This fixes https://github.com/openrc/openrc/pulls/112.
2017-03-07 17:49:42 -06:00
William Hubbs
4a269674b7 make sure netmount and localmount start after root 2017-02-28 17:44:06 -06:00
William Hubbs
eea4decdd1 net-online: typo fix 2017-02-26 19:09:56 -06:00
William Hubbs
d4d0f25a48 net-online: updates to make the service more usable
- switch from attempting to ping the default gateway to a host outside
the local network, defaulting to google.com.
- along with this, change the name of the variable that requests a ping
test to include_ping_test so the meaning is more clear.
2017-02-26 13:51:50 -06:00
William Hubbs
1cb44092fc sh/rc-functions.sh.in: add get_bootparam_value function 2017-02-23 18:16:15 -06:00
William Hubbs
4207e46622 move init.d examples under support and install them 2017-02-22 14:45:16 -06:00
William Hubbs
f6ea16159e scripts: make sure the rc-sstat symlink is always replaced 2017-02-22 14:25:02 -06:00
William Hubbs
9047ea4cb0 install support files
These files have been in the distribution for some time but haven't been
installed. They are good examples of how to do things, so we should
install them.
2017-02-18 15:52:28 -06:00
William Hubbs
d7f5a696c1 support: rename all README files to README.md 2017-02-17 12:29:11 -06:00
William Hubbs
6f614cd3f3 Move deptree2dot to the support folder
Since deptree2dot and the perl requirement are completely optional, we
can move this tool to the support folder. This gives the user the option
of using it if they have perl installed, and means we do not have an
optional runtime dependency on perl.

Documentation for this tool has also been added to the support folder.

X-Gentoo-Bug: 600742
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=600742
2017-02-17 12:06:03 -06:00
William Pitcock
85c1930acf test/setup_env: ensure that eval_ecolors is available on the path.
The test environment previously used the system default paths instead of installing the necessary $PATH environment
variable to make finding eval_ecolors work.
This closes #117.

X-Gentoo-Bug: 374191.
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=374191.
2017-01-31 17:27:13 -06:00
Nicolas Porcel
96bd0c004c Fix typo in guide.md
This fixes #115.
2017-01-26 17:07:01 -06:00
William Hubbs
b693af9055 Revert "scripts: do not substitute for @SHELL@ in rc-sstat"
This reverts commit e2e652e469.
2017-01-26 15:39:19 -06:00
Doug Freed
6dcb692986 start-stop-daemon: allow all standard signals
Also we define the signalpair_item macro.
This fixes #113.

X-Gentoo-Bug: 604986
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=604986
2017-01-25 17:48:52 -06:00
William Hubbs
e2e652e469 scripts: do not substitute for @SHELL@ in rc-sstat 2017-01-08 20:42:26 -06:00
William Hubbs
b73941f0c3 mountinfo: make the path to /proc/mounts a constant
This path should not be hard coded in the open call.
Linux prior to 2.4.19 did not have /proc/self/mounts, so for now I'm
making this value /proc/mounts everywhere, but that may change to
/proc/self/mounts on linux; I'm not sure we should care about <2.4.19.

X-Gentoo-Bug: 604646
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=604646
2017-01-04 18:18:37 -06:00
Benda Xu
c304522131 Clean up warnings that can use the _unused macro
X-Gentoo-Bug: 604666
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=604666
2017-01-04 17:18:35 -06:00
Benda Xu
92325b44ba Indentation fixes
X-Gentoo-Bug: 604666
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=604666
2017-01-04 16:59:38 -06:00
Benda Xu
074d90f5a4 Drop the use of the _BSD_SOURCE macro on Linux
X-Gentoo-Bug: 604666
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=604666
2017-01-04 16:59:24 -06:00
Benda Xu
7056b56b3c Drop the use of the _BSD_SOURCE macro on GNU/Hurd
X-Gentoo-Bug: 604666
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=604666
2017-01-04 16:58:52 -06:00
Doug Freed
d5c3b85e3f loopback: drop explicit route for BSD too 2016-12-21 18:00:02 +00:00
William Hubbs
1ab2249448 version 0.24 2016-12-21 11:50:22 -06:00
51 changed files with 520 additions and 383 deletions

522
ChangeLog
View File

@@ -1,4 +1,216 @@
commit 90ee9cd49df773b2aef2acb2ca72ac92c3e62835
commit 477e3dd8c13705affe87cc2c0e9286b2653a5688
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
sh/gendepends.sh.in: fix detection of service scripts
We do not need to care about the path on the shebang line of a service
script as long as the shebang line ends with "openrc-run".
This fixes #119 and #120.
commit 678e7adeb237edd080a13e463e5d8c40d2acdea7
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
version 0.24.2
commit b087a751deb06986e0d77873046e08ca4864175c
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
update ChangeLog
commit bc05fb75515b3f65f3c63ae5972c749fac00924f
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
update news file
commit e5c2a378f3000cd20826ec6b59ecca15d31190ae
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
Remove all occurances of 'before *' from dependencies
Using wildcards in dependencies causes issues when rc_parallel is set to
yes because it can lead to deadlocks.
All dependencies need to be explicit rather than implicit.
This is the first stage of moving this direction.
commit 3c1a71bd9db50fd410eb64e715a99911c8fad978
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
init.d/sysfs.in: efivarfs tweaks
Since we check for /sys/firmware/efi/efivars, we do not need to check
for /sys/firmware/efi
Since Failing to mount efivarfs is not critical, we silence the error
message from mount.
commit fcb826a45137fec589bf945fe23deeba55879a34
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
version 0.24.1
commit fde3902d069dfdce9c59555186a5541d6d99c8aa
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
update ChangeLog
commit d7bbb0f5830e1ec4df1ec52714d70ac6b0a81878
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
add agetty service
The agetty service is an alternate way to manage gettys with agetty
under Linux which is separate from an external init system.
commit 21ca2b746cce67e2b3578fb7015c9d4c243e3a0c
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
init.d/sysfs: drop modules completely from the dependencies
This is for #112.
commit 6a79aef0159d7035778fd852b26ecfac903cd029
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
init.d/sysfs: Do not load efivarfs module
My understanding is that the kernel can autoload this module. If it
doesn't, the module should be built in or loaded from an initramfs.
This fixes https://github.com/openrc/openrc/pulls/112.
commit 4a269674b765e5267f024fa55c8644480a7304ea
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
make sure netmount and localmount start after root
commit eea4decdd1c84e4b8775a255d8ed85bce5eb40a5
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
net-online: typo fix
commit d4d0f25a4844ecaed43de913e8b729e7a2e894db
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
net-online: updates to make the service more usable
- switch from attempting to ping the default gateway to a host outside
the local network, defaulting to google.com.
- along with this, change the name of the variable that requests a ping
test to include_ping_test so the meaning is more clear.
commit 1cb44092fce298004ab4c4547c6fbcac29c5997f
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
sh/rc-functions.sh.in: add get_bootparam_value function
commit 4207e46622f584eb5f0cc10bbfd36f92f001a2e2
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
move init.d examples under support and install them
commit f6ea16159ec8583a6f2182578334aa00578cb080
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
scripts: make sure the rc-sstat symlink is always replaced
commit 9047ea4cb0d0e5e27704369380e128d26c3e86b2
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
install support files
These files have been in the distribution for some time but haven't been
installed. They are good examples of how to do things, so we should
install them.
commit d7f5a696c173e7af67dd4b3f90744e0a056441e1
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
support: rename all README files to README.md
commit 6f614cd3f33dbdea3a67ac2fb414b1130674ee04
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
Move deptree2dot to the support folder
Since deptree2dot and the perl requirement are completely optional, we
can move this tool to the support folder. This gives the user the option
of using it if they have perl installed, and means we do not have an
optional runtime dependency on perl.
Documentation for this tool has also been added to the support folder.
X-Gentoo-Bug: 600742
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=600742
commit 85c1930acf15b0c9d3c5537fb2b0409c6a11c982
Author: William Pitcock <nenolod@dereferenced.org>
Commit: William Hubbs <w.d.hubbs@gmail.com>
test/setup_env: ensure that eval_ecolors is available on the path.
The test environment previously used the system default paths instead of installing the necessary $PATH environment
variable to make finding eval_ecolors work.
This closes #117.
X-Gentoo-Bug: 374191.
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=374191.
commit 96bd0c004c9549e5a2ef64277216a15da6f96a8e
Author: Nicolas Porcel <nicolasporcel06@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
Fix typo in guide.md
This fixes #115.
commit b693af90556ac9b055ba5c6e589066c1e08b2146
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
Revert "scripts: do not substitute for @SHELL@ in rc-sstat"
This reverts commit e2e652e469efa5f3ebcd69828ff16d8f5ad3f1b8.
commit 6dcb6929869c2f81c1f8d0930191f74fc6dfaa3e
Author: Doug Freed <dwfreed@mtu.edu>
Commit: William Hubbs <w.d.hubbs@gmail.com>
start-stop-daemon: allow all standard signals
Also we define the signalpair_item macro.
This fixes #113.
X-Gentoo-Bug: 604986
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=604986
commit e2e652e469efa5f3ebcd69828ff16d8f5ad3f1b8
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
scripts: do not substitute for @SHELL@ in rc-sstat
commit b73941f0c3020e3dbd1684d09685e114c678b520
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
@@ -12,7 +224,7 @@ Commit: William Hubbs <w.d.hubbs@gmail.com>
X-Gentoo-Bug: 604646
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=604646
commit a7f92e3219d0a5278fe8bd742e2e5cb68048210e
commit c304522131a795cf882444b5f94e81db4baf65b3
Author: Benda Xu <heroxbd@gentoo.org>
Commit: William Hubbs <w.d.hubbs@gmail.com>
@@ -21,7 +233,7 @@ Commit: William Hubbs <w.d.hubbs@gmail.com>
X-Gentoo-Bug: 604666
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=604666
commit 8ae9a9b85614d6c3b246805c3be9e01d49f0b986
commit 92325b44ba58a7ca04d88ae8ca202b402b032b43
Author: Benda Xu <heroxbd@gentoo.org>
Commit: William Hubbs <w.d.hubbs@gmail.com>
@@ -30,17 +242,35 @@ Commit: William Hubbs <w.d.hubbs@gmail.com>
X-Gentoo-Bug: 604666
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=604666
commit c4ebd431c9997e21c82ba020f36c549d1e1bb53c
Author: Doug Freed <dwfreed@mtu.edu>
commit 074d90f5a4e3b66e532a0becde372acf38346397
Author: Benda Xu <heroxbd@gentoo.org>
Commit: William Hubbs <w.d.hubbs@gmail.com>
Drop the use of the _BSD_SOURCE macro on Linux
X-Gentoo-Bug: 604666
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=604666
commit 7056b56b3ccc9cbde4ef8297b923919c49c7c242
Author: Benda Xu <heroxbd@gentoo.org>
Commit: William Hubbs <w.d.hubbs@gmail.com>
Drop the use of the _BSD_SOURCE macro on GNU/Hurd
X-Gentoo-Bug: 604666
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=604666
commit d5c3b85e3fbddbba149687244d607fcdae222f95
Author: Doug Freed <dwfreed@mtu.edu>
Commit: Doug Freed <dwfreed@mtu.edu>
loopback: drop explicit route for BSD too
commit 7e885f37bbe40e098bb84562348a776b60cf17a3
commit 1ab2249448ba24a591b561f53aa64ff3df1e41f6
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
version 0.23.1
version 0.24
commit a15cff21c63f2ad951af1c59a74fc7d37f78e91b
Author: William Hubbs <w.d.hubbs@gmail.com>
@@ -1115,281 +1345,3 @@ Commit: William Hubbs <w.d.hubbs@gmail.com>
X-Gentoo-Bug: 577362
X-Gentoo-Bug-URL: https://bugs.gentoo.org/577362
commit beaa71df0ab2cfa61beba4be0303099aa6c75e6a
Author: Dustin C. Hatch <dustin@hatch.name>
Commit: William Hubbs <w.d.hubbs@gmail.com>
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
commit 7eaf71176b87ae69bfa622aa621341a19a9d32b0
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
Fix rc_env_allow wildcard usage
Before this commit, using * in rc_env_allow did not work.
This fixes #60.
commit 2c1f6a16e10a45397e0872585dcb0e16684b6cbf
Author: Mike Frysinger <vapier@gentoo.org>
Commit: William Hubbs <w.d.hubbs@gmail.com>
sysfs: mount pstore when available
commit e82653782e1803e3c924aef055113333b18dafd9
Author: Patrick Lauer <patrick@gentoo.org>
Commit: William Hubbs <w.d.hubbs@gmail.com>
Add a basic OpenRC users guide
X-Gentoo-Bug: 513024
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=513024
commit e52b5f59c22283b22e2b5a0d2ab9de6b92a73ebf
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
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
commit 8a7e4d38a74c714e1a532e1b7a53fd2a5c528b63
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
rc-service: add --ifinactive and --ifnotstarted flags
X-Gentoo-Bug: 523174
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=523174
commit 47dd5e37cbf372df3ee0fad2c87226dce5b51587
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
add back deprecation warnings lost during refactoring
commit e277ae57efaba3be3eb619fd00084b116c370231
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
fix tests
X-Gentoo-Bug: 572602
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=572602
commit 69f052b611878d771fc3f56ee77639269db9b6e1
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
librc: Complain when a real and virtual service have the same name
commit e4eacf02cae10eca48f6906592981d701b0c1973
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
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.
commit 30c3561b6b648d60174a22a73555b680d2cc86fc
Author: Colin Booth <colin@heliocat.net>
Commit: William Hubbs <w.d.hubbs@gmail.com>
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.
commit 5f2850366ea0f30f0f9cb6b129b69192c11e74ac
Author: Manuel Rüger <manuel@rueg.eu>
Commit: William Hubbs <w.d.hubbs@gmail.com>
Fix typo
This fixes #70.
commit 1cb7eec31f37db0de11a4b39939fd3fbe17c1e24
Author: Gokturk Yuksek <gokturk@binghamton.edu>
Commit: William Hubbs <w.d.hubbs@gmail.com>
conf.d/bootmisc: typo fix: s/dmesc/dmesg/
This fixes #72.
commit cd7883d25d0a9321b68df1c1e6ad9662306fa9e7
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
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
commit 62b49b2a3ad1c13012305b4d7281d7f6543c70d7
Author: Doug Freed <dwfreed@mtu.edu>
Commit: William Hubbs <w.d.hubbs@gmail.com>
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.
commit 4c814a0a285565bc09d662f602f93dbb938503c6
Author: Doug Freed <dwfreed@mtu.edu>
Commit: William Hubbs <w.d.hubbs@gmail.com>
librc: handle rc_sys="prefix" even if we weren't built with a prefix
This probably isn't needed, but it mimics old behavior.
commit 36dde4e7f21afba36a96837aa86f2b5d2dae3807
Author: Doug Freed <dwfreed@mtu.edu>
Commit: William Hubbs <w.d.hubbs@gmail.com>
librc: fix handling the nothing special case for rc_sys
commit 649f63d882d53533ae8b1c3b28967e772e738c45
Author: Doug Freed <dwfreed@mtu.edu>
Commit: William Hubbs <w.d.hubbs@gmail.com>
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.
commit 55a28f5d2524615560698453a5a6afd50460030c
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
Revert "rc: make get_systype similar to the old rc_sys function"
This reverts commit f79a7a7be18d68bf264efc60d82838d03048da6b.
commit 6c0942137572608d02eb4b34bad55c9bf418a6ba
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
Revert "librc: fix librc-depend functions to call rc_sys"
This reverts commit 73482cf13a338051606788957cbd0031ac850c70.
commit 79359f77cc786e18695368bccb6b6186ecfe38c0
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
fix bsd build
X-Gentoo-Bug: 572068
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=572068
commit f79a7a7be18d68bf264efc60d82838d03048da6b
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
rc: make get_systype similar to the old rc_sys function
commit 73482cf13a338051606788957cbd0031ac850c70
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
librc: fix librc-depend functions to call rc_sys
commit 0910c455d3723ac4d4b793afb61cd82f660547f4
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
src/rc/Makefile: fix make depend target
commit f5e06bc55ab1717ddff8c21f00f48cfcba8cb4a7
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
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.
commit e7ae08c38d4753d8d54a4ed60ca98794d85aadd9
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
version 0.21
commit 6da0abc0850dfc99df0ba50cbd0092929ec0107b
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
fix selinux build
X-Gentoo-Bug: 571798
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=571798
commit b34df9dd817069ade7e0526a59aaa9d3f2beb806
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
fix selinux build
commit 6f02069746f4d8a2331ab7e000abdca9bbdd622d
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
Add LANG, LC_MESSAGES and TERM to the environment whitelist
commit d4c7207ef3906daf6f8646e8deb6d968fe76cb36
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
fix seg fault
commit 04f05c30d13ec83b85164a536eb570f29a66b275
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
update ChangeLog
commit 9473ac514cb72663d5c3bac8b5473cced4a20bf7
Author: joe9 <joe9mail@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
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
commit bf2f40828ee26d3ba9185f29db596ee5d7b9cf61
Author: William Hubbs <w.d.hubbs@gmail.com>
Commit: William Hubbs <w.d.hubbs@gmail.com>
Remove multicall binary structure from OpenRC
This eliminates the need for the selinux-specific wrapper scrript we
were installing in /lib*/rc/{bin,sbin}.

View File

@@ -13,7 +13,7 @@ MK= ${TOP}/mk
include ${TOP}/Makefile.inc
SUBDIR= conf.d etc init.d local.d man scripts sh src sysctl.d
SUBDIR= conf.d etc init.d local.d man scripts sh src support sysctl.d
# Build pkgconfig or not
MKPKGCONFIG?= yes

View File

@@ -1,3 +1,3 @@
NAME= openrc
VERSION= 0.23.1
VERSION= 0.24.2
PKG= ${NAME}-${VERSION}

22
NEWS.md
View File

@@ -3,6 +3,28 @@
This file will contain a list of notable changes for each release. Note
the information in this file is in reverse order.
## OpenRC-0.24.1
This version starts cleaning up the dependencies so that rc_parallel
will work correctly.
The first step in this process is to remove the 'before *' from the
depend functions in the clock services. This means some services not
controlled by OpenRC may now start before instead of after the clock
service. If it is important for these services to start after the clock
service, they need to have 'after clock' added to their depend
functions.
## OpenRC-0.24
Since the deptree2dot tool and the perl requirement are completely
optional, the deptree2dot tool has been moved to the support directory.
As a result, the MKTOOLS=yes/no switch has been removed from the makefiles.
This version adds the agetty service which can be used to spawn
agetty on a specific terminal. This is currently documented in the
agetty-guide.md file at the top level of this distribution.
## OpenRC-0.23
The tmpfiles.d processing code, which was part of previous versions of

View File

@@ -30,7 +30,6 @@ MKSELINUX=yes
MKSTATICLIBS=no
MKTERMCAP=ncurses
MKTERMCAP=termcap
MKTOOLS=yes
PKG_PREFIX=/usr/pkg
LOCAL_PREFIX=/usr/local
PREFIX=/usr/local
@@ -73,10 +72,6 @@ Obviously, if you're installing this onto a system that does not use
OpenRC by default then you may wish to backup the above listed files,
remove them and then install so that the OS hooks into OpenRC.
`init.d.misc` is not installed by default as the scripts will need
tweaking on a per distro basis. They are also non essential to the
operation of the system.
## Reporting Bugs
If you are using Gentoo Linux, bugs can be filed on their bugzilla under

19
agetty-guide.md Normal file
View File

@@ -0,0 +1,19 @@
# Setting up the agetty service in OpenRC
The agetty service is an OpenRC specific way to monitor and respawn a
getty, using agetty, on Linux. To use this method, make sure you aren't
spawning a getty manager for this port some other way (such as through
sysvinit/inittab), then run the following commands as root.
Note that [port] refers to the port you are spawning the getty on, and
not the full path to it. For example, tty0 or ttyS0instead of /dev/tty0
or /dev/ttyS0.
tty0 or ttyS0, not the full path to it (for example, tty0 or ttyS0 and
```
# cd /etc/init.d
# ln -s agetty agetty.[port]
# cd /etc/conf.d
# cp agetty agetty.[port]
#rc-update add agetty.[port] [runlevel]
```

View File

@@ -12,8 +12,8 @@ include ${MK}/os.mk
CONF-FreeBSD= ipfw modules moused powerd rarpd savecore syscons
CONF-Linux= consolefont devfs dmesg hwclock keymaps killprocs modules mtab \
net-online
CONF-Linux= agetty consolefont devfs dmesg hwclock keymaps killprocs modules \
mtab net-online
CONF-NetBSD= moused rarpd savecore

8
conf.d/agetty Normal file
View File

@@ -0,0 +1,8 @@
# Set the baud rate of the terminal line
#baud=""
# set the terminal type
#termtype="linux"
# extra options to pass to agetty for this port
#agetty_options=""

View File

@@ -3,10 +3,13 @@
# default is all interfaces that support ethernet.
#interfaces=""
# This setting controls whether a ping to the default gateway is
# included in the test for network connectivity after all interfaces
# are active.
#ping_default_gateway=no
# This setting controls whether a ping test is included in the test for
# network connectivity after all interfaces are active.
#include_ping_test=no
# This setting is the host to attempt to ping if the above is yes.
# The default is google.com.
#ping_test_host=some.host.name
# The timeout setting controls how long the net-online service waits
# for the network to be configured.

View File

@@ -198,7 +198,7 @@ script:
command=
command_args=
pidfile=
``
```
Thus the 'smallest' service scripts can be half a dozen lines long

View File

@@ -21,9 +21,9 @@ SRCS-FreeBSD= hostid.in modules.in moused.in newsyslog.in pf.in rarpd.in \
SRCS-FreeBSD+= adjkerntz.in devd.in dumpon.in encswap.in ipfw.in \
modules.in modules-load.in mixer.in nscd.in powerd.in syscons.in
SRCS-Linux= binfmt.in devfs.in dmesg.in hwclock.in consolefont.in keymaps.in \
killprocs.in modules.in modules-load.in mount-ro.in mtab.in numlock.in \
procfs.in net-online.in sysfs.in termencoding.in
SRCS-Linux= agetty.in binfmt.in devfs.in dmesg.in hwclock.in consolefont.in \
keymaps.in killprocs.in modules.in modules-load.in mount-ro.in mtab.in \
numlock.in procfs.in net-online.in sysfs.in termencoding.in
# Generic BSD scripts
SRCS-NetBSD= hostid.in moused.in newsyslog.in pf.in rarpd.in rc-enabled.in \

31
init.d/agetty.in Normal file
View File

@@ -0,0 +1,31 @@
#!@SBINDIR@/openrc-run
# Copyright (c) 2017 The OpenRC Authors.
# See the Authors file at the top-level directory of this distribution and
# https://github.com/OpenRC/openrc/blob/master/AUTHORS
#
# This file is part of OpenRC. It is subject to the license terms in
# the LICENSE file found in the top-level directory of this
# distribution and at https://github.com/OpenRC/openrc/blob/master/LICENSE
# This file may not be copied, modified, propagated, or distributed
# except according to the terms contained in the LICENSE file.
description="start agetty on a terminal line"
supervisor=supervise-daemon
port="${RC_SVCNAME#*.}"
term_type="${term_type:-linux}"
command=/sbin/agetty
command_args_foreground="${agetty_options} ${port} ${baud} ${termtype}"
pidfile="/run/${RC_SVCNAME}.pid"
depend() {
after local
}
start_pre() {
if [ -z "$port" ]; then
eerror "${RC_SVCNAME} cannot be started directly. You must create"
eerror "symbolic links to it for the ports you want to start"
eerror "agetty on and add those to the appropriate runlevels."
return 1
fi
}

View File

@@ -34,7 +34,8 @@ depend()
if yesno $clock_adjfile; then
use root
else
before *
before binfmt bootmisc fsck hostname keymaps localmount loopback mtab
before procfs root swap sysctl termencoding urandom
fi
keyword -docker -lxc -openvz -prefix -systemd-nspawn -uml -vserver -xenu
}

View File

@@ -14,8 +14,8 @@ description="Mounts disks and swap according to /etc/fstab."
depend()
{
need fsck
use lvm modules mtab
after lvm modules
use lvm modules mtab root
after lvm modules root
keyword -docker -jail -lxc -prefix -systemd-nspawn -vserver
}

View File

@@ -15,6 +15,7 @@ depend()
{
after modules
need sysfs
provide network-online
keyword -docker -jail -lxc -openvz -prefix -systemd-nspawn -uml -vserver
}
@@ -27,19 +28,6 @@ get_interfaces()
done
}
get_default_gateway()
{
local cmd gateway
if command -v ip > /dev/null 2>&1; then
cmd="ip route show"
else
cmd=route
fi
set -- $($cmd | grep default)
[ "$2" != via ] && gateway="$2" || gateway="$3"
printf "%s" $gateway
}
start ()
{
local carriers configured dev gateway ifcount infinite
@@ -66,10 +54,15 @@ start ()
: $((timeout -= 1))
done
! $infinite && [ $timeout -eq 0 ] && rc=1
if [ $rc -eq 0 ] && yesno ${ping_default_gateway:-no}; then
gateway="$(get_default_gateway)"
if [ -n "$gateway" ] && ! ping -c 1 $gateway > /dev/null 2>&1; then
rc=1
include_ping_test=${include_ping_test:-${ping_default_gateway}}
if [ -n "${ping_default_gateway}" ]; then
ewarn "ping_default_gateway is deprecated, please use include_ping_test"
fi
if [ $rc -eq 0 ] && yesno ${include_ping_test:-no}; then
ping_test_host="${ping_test_host:-google.com}"
if [ -n "$ping_test_host" ]; then
ping -c 1 $ping_test_host > /dev/null 2>&1
rc=$?
fi
fi
eend $rc "The network is offline"

View File

@@ -20,10 +20,12 @@ depend()
*) mywant="$mywant nfsclient"; break ;;
esac
done
after root
config /etc/fstab
want $mywant
use afc-client amd openvpn
use dns
use root
keyword -docker -jail -lxc -prefix -systemd-nspawn -vserver
}

View File

@@ -13,7 +13,10 @@ description="Sets the local clock to the mtime of a given file."
depend()
{
before *
before adjkerntz binfmt bootmisc devdb dumpon fsck hostid hostname keymaps
before localmount loopback modules mtab network newsyslog procfs root
before savecore staticroute swap swap-blk syscons sysctl syslogd
before termencoding ttys urandom wscons
provide clock
keyword -docker -lxc -openvz -prefix -systemd-nspawn -uml -vserver -xenu
}

View File

@@ -15,7 +15,6 @@ sysfs_opts=nodev,noexec,nosuid
depend()
{
want modules
keyword -docker -lxc -prefix -systemd-nspawn -vserver
}
@@ -99,23 +98,12 @@ mount_misc()
fi
# set up kernel support for efivarfs
# The presence of /sys/firmware/efi indicates that the system was
# booted in efi mode.
if [ -d /sys/firmware/efi ]; then
if [ ! -d /sys/firmware/efi/efivars ] &&
modprobe -q efivarfs; then
ewarn "The efivarfs module needs to be configured in " \
"@SYSCONFDIR@/conf.d/modules or built in"
fi
if [ -d /sys/firmware/efi/efivars ] &&
! mountinfo -q /sys/firmware/efi/efivars; then
if grep -qs efivarfs /proc/filesystems; then
ebegin "Mounting efivarfs filesystem"
mount -n -t efivarfs -o ${sysfs_opts} \
efivarfs /sys/firmware/efi/efivars
eend $?
fi
fi
if [ -d /sys/firmware/efi/efivars ] &&
! mountinfo -q /sys/firmware/efi/efivars; then
ebegin "Mounting efivarfs filesystem"
mount -n -t efivarfs -o ${sysfs_opts} \
efivarfs /sys/firmware/efi/efivars 2> /dev/null
eend 0
fi
}

View File

@@ -11,5 +11,5 @@
SFX= .GNU.in
PKG_PREFIX?= /usr
CPPFLAGS+= -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -DMAXPATHLEN=4096 -DPATH_MAX=4096
CPPFLAGS+= -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=700 -DMAXPATHLEN=4096 -DPATH_MAX=4096
LIBDL= -Wl,-Bdynamic -ldl

View File

@@ -11,7 +11,7 @@
SFX= .Linux.in
PKG_PREFIX?= /usr
CPPFLAGS+= -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=700
CPPFLAGS+= -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=700
LIBDL= -Wl,-Bdynamic -ldl
ifeq (${MKSELINUX},yes)

View File

@@ -59,6 +59,9 @@ MANPREFIX?= ${UPREFIX}/share
MANDIR?= ${MANPREFIX}/man
MANMODE?= 0444
DATADIR?= ${UPREFIX}/share/openrc
DATAMODE?= 0644
DOCDIR?= ${UPREFIX}/share/doc
DOCMODE?= 0644

View File

@@ -13,7 +13,7 @@ endif
_installafter:
ifeq (${OS},Linux)
${INSTALL} -d ${DESTDIR}${SBINDIR}
ln -s ${DIR}/rc-sstat ${DESTDIR}/${SBINDIR}/rc-sstat
ln -sf ${DIR}/rc-sstat ${DESTDIR}/${SBINDIR}/rc-sstat
endif
include ${MK}/scripts.mk

View File

@@ -74,11 +74,22 @@ do
# Only generate dependencies for OpenRC scripts
read one two three <"$RC_SERVICE"
[ "$one" = "#!@SBINDIR@/runscript" ] || \
[ "$one" = "#!@SBINDIR@/openrc-run" ] || \
[ "$one" = "#!" -a "$two" = "@SBINDIR@/runscript" ] || \
[ "$one" = "#!" -a "$two" = "@SBINDIR@/openrc-run" ] || \
continue
case "$one" in
\#*/openrc-run) ;;
\#*/runscript) ;;
\#!)
case "$two" in
*/openrc-run) ;;
*/runscript) ;;
*)
continue
;;
esac
;;
*)
continue
;;
esac
unset one two three
RC_SVCNAME=${RC_SERVICE##*/} ; export RC_SVCNAME

View File

@@ -85,6 +85,40 @@ get_bootparam()
return 1
}
get_bootparam_value()
{
local match="$1" which_value="$2" sep="$3" result value
if [ -n "$match" -a -r /proc/cmdline ]; then
set -- $(cat /proc/cmdline)
while [ -n "$1" ]; do
case "$1" in
$match=*)
value="${1##*=}"
case "$which_value" in
all)
[ -z "$sep" ] && sep=' '
if [ -z "$result" ]; then
result="$value"
else
result="${result}${sep}${value}"
fi
;;
last)
result="$value"
;;
*)
result="$value"
break
;;
esac
;;
esac
shift
done
fi
echo $result
}
# Called from openrc-run.sh or gendepends.sh
_get_containers() {
local c

View File

@@ -3,9 +3,5 @@
SUBDIR= test libeinfo librc rc
ifeq (${MKTOOLS},yes)
SUBDIR+= tools
endif
MK= ../mk
include ${MK}/subdir.mk

View File

@@ -197,26 +197,45 @@ parse_signal(const char *sig)
int signal;
} SIGNALPAIR;
#define signalpair_item(name) { #name, SIG##name },
static const SIGNALPAIR signallist[] = {
{ "ABRT", SIGABRT },
{ "ALRM", SIGALRM },
{ "FPE", SIGFPE },
{ "HUP", SIGHUP },
{ "ILL", SIGILL },
{ "INT", SIGINT },
{ "KILL", SIGKILL },
{ "PIPE", SIGPIPE },
{ "QUIT", SIGQUIT },
{ "SEGV", SIGSEGV },
{ "TERM", SIGTERM },
{ "USR1", SIGUSR1 },
{ "USR2", SIGUSR2 },
{ "CHLD", SIGCHLD },
{ "CONT", SIGCONT },
{ "STOP", SIGSTOP },
{ "TSTP", SIGTSTP },
{ "TTIN", SIGTTIN },
{ "TTOU", SIGTTOU },
signalpair_item(HUP)
signalpair_item(INT)
signalpair_item(QUIT)
signalpair_item(ILL)
signalpair_item(TRAP)
signalpair_item(ABRT)
signalpair_item(BUS)
signalpair_item(FPE)
signalpair_item(KILL)
signalpair_item(USR1)
signalpair_item(SEGV)
signalpair_item(USR2)
signalpair_item(PIPE)
signalpair_item(ALRM)
signalpair_item(TERM)
signalpair_item(CHLD)
signalpair_item(CONT)
signalpair_item(STOP)
signalpair_item(TSTP)
signalpair_item(TTIN)
signalpair_item(TTOU)
signalpair_item(URG)
signalpair_item(XCPU)
signalpair_item(XFSZ)
signalpair_item(VTALRM)
signalpair_item(PROF)
#ifdef SIGWINCH
signalpair_item(WINCH)
#endif
#ifdef SIGIO
signalpair_item(IO)
#endif
#ifdef SIGPWR
signalpair_item(PWR)
#endif
signalpair_item(SYS)
{ "NULL", 0 },
};

View File

@@ -1,5 +0,0 @@
DIR= ${UPREFIX}/bin
BIN= deptree2dot
MK= ../../mk
include ${MK}/scripts.mk

20
support/Makefile Normal file
View File

@@ -0,0 +1,20 @@
# Copyright (c) 2017 the OpenRC Authors.
# See the Authors file at the top-level directory of this distribution and
# https://github.com/OpenRC/openrc/blob/master/AUTHORS
#
# This file is part of OpenRC. It is subject to the license terms in
# the LICENSE file found in the top-level directory of this
# distribution and at https://github.com/OpenRC/openrc/blob/master/LICENSE
# This file may not be copied, modified, propagated, or distributed
# except according to the terms contained in the LICENSE file.
MK= ../mk
include ${MK}/os.mk
SUBDIR= deptree2dot init.d.examples openvpn
ifeq (${OS},Linux)
SUBDIR+= sysvinit
endif
include ${MK}/subdir.mk

View File

@@ -0,0 +1,9 @@
MK= ../../mk
include ${MK}/os.mk
DIR= ${DATADIR}/support/deptree2dot
BIN= deptree2dot
INC= README.md
include ${MK}/scripts.mk

View File

@@ -0,0 +1,11 @@
# deptree2dot - Graph the OpenRC Dependency Tree
This utility can be used to graph the OpenRC dependency tree. It
requires perl5.x and converts the tree to a .dot file which can be
processed by graphviz.
Example usage:
$ chmod +x deptree2dot
$deptree2dot > deptree.dot
$deptree2dot | dot -Tpng -o deptree.png

View File

@@ -1,9 +1,11 @@
DIR= ${INITDIR}
DIR= ${DATADIR}/support/init.d.examples
INC= README.md
SRCS= avahi-dnsconfd.in avahid.in dhcpcd.in dbus.in \
hald.in named.in ntpd.in \
openvpn.in polkitd.in sshd.in wpa_supplicant.in
BIN= ${OBJS}
MK= ../mk
MK= ../../mk
SED_EXTRA+= -e 's:@VARBASE@:/var:g'

View File

@@ -0,0 +1,3 @@
The service scripts in this directory are meant as examples only.
They are not installed by default as the scripts will need tweaking on a
per distro basis. They are also non essential to the operation of the system.

9
support/openvpn/Makefile Normal file
View File

@@ -0,0 +1,9 @@
MK= ../../mk
include ${MK}/os.mk
DIR= ${DATADIR}/support/openvpn
BIN= down.sh up.sh
INC= README.md
include ${MK}/scripts.mk

View File

@@ -0,0 +1,8 @@
MK= ../../mk
include ${MK}/os.mk
DIR= ${DATADIR}/support/sysvinit
INC= inittab README.md
include ${MK}/scripts.mk

View File

@@ -9,6 +9,10 @@ srcdir=${srcdir:-.}
top_builddir=${top_builddir:-${top_srcdir}}
builddir=${builddir:-${srcdir}}
LD_LIBRARY_PATH=${top_builddir}/src/libeinfo:${top_builddir}/src/librc:${LD_LIBRARY_PATH}
PATH=${top_builddir}/src/rc:${PATH}
export LD_LIBRARY_PATH PATH
if [ ! -f ${top_srcdir}/sh/functions.sh ] ; then
echo "functions.sh not yet created !?" 1>&2
exit 1
@@ -17,7 +21,3 @@ elif ! . ${top_srcdir}/sh/functions.sh; then
exit 1
fi
LD_LIBRARY_PATH=${top_builddir}/src/libeinfo:${top_builddir}/src/librc:${LD_LIBRARY_PATH}
PATH=${top_builddir}/src/rc:${PATH}
export LD_LIBRARY_PATH PATH