Commit Graph

2917 Commits

Author SHA1 Message Date
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
William Hubbs
a15cff21c6 update ChangeLog 2016-12-20 12:34:22 -06:00
Doug Freed
45aa36cc62 librc: detect loops in stacked runlevels and abort
This fixes #109.
X-Gentoo-Bug: 558700
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=558700
2016-12-19 18:24:31 -06:00
William Hubbs
d3f833179b sh/init.sh.Linux.in: remove unused check for Gnu/KFreeBSD
This script only runs on Linux, so the check will always be false.
2016-12-18 11:53:12 -06:00
William Hubbs
abe552b969 modules: get rid of printing each module on Linux
Now that we respect the module blacklists, don't print every module we
try to load, because it might not end up loaded due to the blacklist,
and modprobe doesn't consider that a failure.
2016-12-17 19:21:13 -06:00
Doug Freed
856eafb006 sh/init.sh.Linux.in: skip /proc test if no md5sum
This will also warn users if md5sum is missing, which serves as a pretty
good indicator that /usr is not mounted.
2016-12-17 23:27:37 +00:00
Robin H. Johnson
f27d60add9
sh/openrc-run.sh: expose default start/stop/status
Supervisor setups break easily when start/stop/status functions are not
default.

Applications that write multiple PIDs to a pidfile (eg HAProxy as
described in bug 601540), can also benefit from being able to call the
default start/stop/status with modified environment variables.

Expose the default start/stop/status functions as
default_start/stop/status, and use them for the defaults
start/stop/status.

Trivial usage example:
```
  stop()
  {
    t=$(mktemp)
    for pid in $(cat $pidfile) ; do
      echo $pid >$t
      pidfile=$t default_stop
    done
    rm -f $t
  }
```

X-Gentoo-Bug: 601540
X-Gentoo-Bug-URL: https://bugs.gentoo.org/601540
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2016-12-17 14:50:11 -08:00
Doug Freed
8ad460c54c Fix typos
Fixes #99
2016-12-17 18:41:02 +00:00
Doug Freed
72c0824961 localmount: add comment about types variable 2016-12-17 18:39:53 +00:00
Alan Somers
5b7e3490ef Localmount shouldn't mount remote filesystems
The /etc/init.d/localmount script has a syntax error that causes it to
attempt to mount remote filesystems, causing the boot to fail. The
script appends a "no" to each remote filesystem type, but it should only
be append the "no" to the beginning of the list.  This patch fixes
localmount on FreeBSD 12.0.  A review of the mount(8) manpage on Ubuntu
12.04 suggests that this patch is correct for Linux, too.
2016-12-17 13:35:58 -05:00
William Hubbs
dd61e6bfc3 rc.conf: fix the commented default setting for rc_logger
X-Gentoo-Bug: 601480
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=601480
2016-12-15 17:52:34 -06:00
Doug Freed
204971c6e2 runlevels: remove bad trailing backslash 2016-12-12 15:13:26 -05:00
William Hubbs
3552f0ae54 man/start-stop-daemon.8: clarify documentation about --pidfile option
The documentation implied that if you stop a daemon we handle multiple
pids in a pid file. This is not correct. We only handle the first pid.

X-Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=601540
2016-12-05 12:25:52 -06:00
AndCycle
42cb848829 fix manual typo
This fixes #105.
2016-12-02 10:57:10 -06:00
William Hubbs
e0ac661419 split tmpfiles processing into opentmpfiles
The openntmpfiles package is designed so that it can be used on systems
independently of whether openrc is used.
2016-12-01 12:04:54 -06:00
Jason Zaman
6414c3bc39 selinux: fix SIGSEGV with invalid contexts
Fixes: https://github.com/openrc/openrc/issues/104
2016-11-17 12:03:12 -06:00
William Hubbs
4f9bd7e4db init.d/loopback.in: drop the route to the loopback interface on Linux
This is related to #103.
2016-11-03 12:47:01 -05:00
William Hubbs
bf539f2196 init.d/mount-ro: do not remount /usr read only if it is premounted
X-Gentoo-Bug: 573760
X-Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=573760
2016-11-03 12:29:21 -05:00
William Hubbs
20b60ea904 conf.d/net-online: clarify comment about interfaces setting
This setting refers to all interfaces that support ethernet
2016-11-03 11:57:40 -05:00
William Hubbs
f53c8baef3 init.d/net-online: remove interfaces and timeout from local declarations
X-Gentoo-Bug:  598621
X-Gentoo-Bug-URL:  https://bugs.gentoo.org/show_bug.cgi?id=598621
2016-11-03 11:18:20 -05:00
William Hubbs
be06cd250e src/rc/rc: do not try to start services if fork fails 2016-11-01 17:31:57 -05:00
Robin H. Johnson
003657c973 init.d/loopback: drop scope on loopback
Busybox does not support the 'scope' argument on 'ip address add' or 'ip
route add', this is documented in BUSYBOX.md, but is no longer actually
needed, as the kernel does get it right without manual specification,
and the ifconfig variant already relies on the kernel to get it right.
This is part of #103.

X-Gentoo-Bug: 487208
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=487208
2016-10-25 10:49:14 -05:00
William Hubbs
4fd144c0a6 src/rc/rc-misc.c: report error if call to flock() fails
X-Gentoo-Bug: 597390
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=597390
2016-10-24 12:47:49 -05:00
Joe Maloney
c44c904a61 init.d.misc/wpa_supplicant: find wireless interface for FreeBSD
This fixes #101.
2016-10-16 11:10:57 -05:00
Sven Wegener
78146b0e14 do_service: Initialize idx to 0
If index is not explicitly specified for service_started_daemon, it will
look for daemons by random index.

This fixes #100.
2016-10-11 10:30:02 -05:00
William Hubbs
deaae7ab5c init.d/sysfs: load efivarfs module when booting in efi mode:1
The presence of /sys/firmware/efi is used to indicate that the system
was booted in efi mode.
2016-10-05 22:48:17 -05:00
William Hubbs
3d2c2f0b87 init.d/sysfs: fix efivarfs module test 2016-10-04 18:18:17 -05:00
William Hubbs
6a0c033a64 init.d/sysfs: fix efivarfs handling
Separate loading the module, if it isn't built in or loaded, from
mounting the file system.

This also makes sure the warning about configuring the module in
/etc/conf.d/modules or building it in is displayed only if it is loaded
successfully.

X-Gentoo-Bug: 595836
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=595836
2016-10-04 12:06:58 -05:00
Doug Freed
6710316a18 openrc-run: fix double free 2016-09-30 17:29:56 -04:00
Doug Freed
61882821e0 init.d: Clean up some bad ewarn output 2016-09-28 15:00:40 -04:00
William Hubbs
969546bcf0 typo fix
X-Gentoo-Bug: 595306
X-Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=595306
2016-09-27 19:39:02 -05:00
William Hubbs
d0ae7ffc25 version 0.23 2016-09-27 19:38:07 -05:00
William Hubbs
b71bcc2422 update ChangeLog 2016-09-27 12:24:40 -05:00
William Hubbs
24010dcb48 dist: convert to tar.gz
This allows the "make dist" target to be used as well as the github
archive generation.
2016-09-23 15:28:56 -05:00
William Hubbs
0a76627345 init.d/swap: remove the case for linux
I am removing the separate case for Linux, because we are droppping the
"-e" switch.
2016-09-23 14:17:14 -05:00
William Hubbs
bbf98befb8 sh/init.sh.Linux.in: update test for live /proc to use md5sum
This allows us to avoid the warnings from bash-4.4 about null bytes in
command substitutions.

If you have separate /usr, are not using an initramfs, and have a file
called /proc/self/environ on your root file system, this will break.
X-Gentoo-Bug: 594534
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=594534
2016-09-22 17:37:09 -05:00
William Hubbs
316903fbf0 man/openrc-run.8: typo fix 2016-09-22 10:30:41 -05:00
William Hubbs
66a9788435 man/openrc-run.8: Add note about eval usage
This fixes #77.
2016-09-21 13:33:39 -05:00
William Hubbs
bf73363f22 Add --use-blacklist to modprobe calls in modules and modules-load
This means that we will honor the modprobe black lists.

X-Gentoo-Bug: 594012
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=594012
2016-09-20 13:15:39 -05:00