Commit Graph

2622 Commits

Author SHA1 Message Date
William Hubbs
c09eeca491 Add rc.conf.d support
This makes it possible to override settings in rc.conf by adding a
directory @SYSCONFDIR@/rc.conf.d and putting files in this directory.
The files will be processed in lexical order, and the last setting in
these files will be used.
2015-11-05 10:40:24 -06:00
William Hubbs
4cf6b0ecf7 consolefont: add after modules to dependencies
X-Gentoo-Bug: 559540
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=559540
2015-10-29 11:27:27 -05:00
William Hubbs
ee944553a9 bootmisc: optionally save the previous dmesg log
X-Gentoo-Bug: 561204
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=561204
2015-10-21 14:04:28 -05:00
William Hubbs
6cae41a4e6 etc/rc.conf: Clean up documentation for rc_hotplug
X-Gentoo-Bug: 554540
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=554540
2015-10-21 12:49:00 -05:00
William Hubbs
960881fcfe Add net-online service 2015-10-20 12:13:47 -05:00
William Hubbs
d26013494d mtab: typo fix 2015-10-14 17:48:32 -05:00
William Hubbs
b29b2fb3cb mtab: make /etc/mtab as a file configurable 2015-10-14 12:19:13 -05:00
William Hubbs
7da72ce487 openrc-run.sh: fix new required_* tests to exit properly 2015-10-13 17:45:05 -05:00
William Hubbs
fc777aeaf3 typo fix
X-Gentoo-Bug: 563010
X-Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=563010
2015-10-13 15:51:15 -05:00
William Hubbs
9d53d436ae sysfs: consolidate cgroup processing code in a single function 2015-10-13 15:07:53 -05: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
29f7e33592 openrc-run.sh: allow spaces in required_{files,dirs}
X-Gentoo-Bug: 562320
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=562320
2015-10-13 07:59:50 -05:00
William Hubbs
850ca03077 increment version number 2015-10-08 16:14:34 -05:00
William Hubbs
050ddfae4a Update ChangeLog 2015-10-08 13:33:27 -05:00
William Hubbs
d5116cc697 localmount: white space cleanup 2015-10-08 13:20:14 -05:00
Ian Stakenvicius
b86d170037 localmount: clean up handling of aufs branches
X-Gentoo-Bug: 560008
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=560008
2015-10-08 12:49:09 -05:00
William Hubbs
6fa0d6318b mtab: fix update logic
This advises users to remove mtab from their runlevels if /etc/mtab is a
symlink, and it creates the symlink if /etc/mtab does not exist on a
system.

X-Gentoo-Bug: 560060
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=560060
2015-10-07 11:35:31 -05:00
Austin S. Hemmelgarn
80d3928b0d cgroups: Add the hugetlb, net_cls and pids controllers
Note from WilliamH: I slightly rearranged the code and added the
settings in rc.conf.

X-Gentoo-Bug: 555488
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=555488
2015-10-06 15:05:35 -05:00
William Hubbs
17ef205bc6 sysfs: use printf instead of echo to write to cgroup files
This is needed for compatibility with musl and printf is also posix.

X-Gentoo-Bug: 562334
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=562334
2015-10-06 13:31:43 -05:00
William Hubbs
b20a1951ad rc-cgroup.sh: Do not add leading spaces to cgroup values
We were starting the value we write to the cgroup setting file with
leading spaces and this was causing issues. This change makes sure that
we aren't adding leading spaces to the value.

X-Gentoo-Bug: 562354
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=562354
2015-10-06 12:11:29 -05:00
William Hubbs
bf0c0dd564 bootmisc: convert errors in clean_run function to warnings
X-Gentoo-Bug: 552418
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=552418
2015-10-05 11:22:08 -05:00
William Hubbs
1558ad2b9e bootmisc: only remove temp directory if umount is successful
Change the clean_run function to only remove the temp directory if the
umount was successful.

X-Gentoo-Bug: 561230
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=561230
2015-10-05 11:08:11 -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
a59365a582 start-stop-daemon.sh: complain in start if command is undefined
The default start-stop-daemon start function expects the command
variable to be defined to point to the daemon we want to start.

If the variable is undefined, this means that there will be nothing to
start, and in this case we should complain because it is possible that
the script writer made a typo in the variable name.
2015-10-02 16:34:15 -05:00
William Hubbs
dac5966ca4 Revert "local/netmount: remove uses of -O [no]_netdev"
This reverts commit 2a439c85bd.
There is another use case for -O involving iscsi, so we can't remove it.
2015-10-01 17:33:43 -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
b047ea47e9 localmount/netmount: on Linux, fail if some file systems do not mount
The following return codes are returned by mount -a:

0:  all file systems mounted.
32: no file systems mounted.
64: some file systems mounted.

The localmount/netmount services should fail if all file systems that
should mount did not mount.
2015-09-01 14:41:07 -05:00
William Hubbs
b652752339 Make localmount and netmount always succeed on non-linux 2015-08-21 12:21:31 -05:00
William Hubbs
2a439c85bd local/netmount: remove uses of -O [no]_netdev
This was causing an incompatibility with busybox, and we do not use it
in Gentoo.
2015-08-18 18:25:48 -05:00
William Hubbs
7341cd882f allow localmount and netmount to fail 2015-08-17 18:21:39 -05:00
Mike Frysinger
279f1e5d10 binfmt: fix indent on return 2015-08-10 18:50:10 -05:00
Doug Freed
c256a7aa80 savecache: clean up implementation
X-Gentoo-Bug: 557222
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=557222
2015-08-10 14:51:15 +00:00
Jason Zaman
6a42298257 tmpfiles: run restorecon on the entire path
The tmpfiles "d" entry will create a full path and only the last dir in
the path will have its SELinux label set correctly. This patch will
restorecon the parents as well so that the selinux labels are correct.

eg, "d /run/libvirt/lxc", then "lxc" would have the correct SELinux
label but "libvirt" would not.

Signed-off-by: Jason Zaman <jason@perfinion.com>
2015-08-03 12:51:16 -07: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
dde339070b Increment version 2015-07-10 13:25:43 -05:00
Doug Freed
1736be3bc3 savecache: Fix unable to create cache message
The cache is created in $RC_LIBEXECDIR, not $RC_SVCDIR, so fix the error
message when we fail to create it to match.
2015-07-10 13:24:10 -04:00
Mike Gilbert
a36a635b01 tmpfiles: Recognize type 'v' (create btrfs subvol)
This change does NOT implement btrfs subvol creation.  Instead, it
treats 'v' the same as 'd', which is an acceptable fallback
according to the manual.

Fixes #58
2015-06-24 22:40:35 -07:00
Mike Gilbert
9310ccc06b Remove execute bit from tmpfiles.sh.in 2015-06-24 22:40:02 -07:00
William Hubbs
0c2e4eb3cd Update ChangeLog 2015-06-19 09:55:37 -05:00
William Hubbs
d2ce07e227 Add rc-sstat script
The rc-sstat script is written to display status of s6 services and
run rc-status to display all services status.

This currently only works on Linux.
2015-06-10 18:45:29 -05:00
Mike Gilbert
b209fe3859 bootmisc: Don't call dmesg in systemd-nspawn containers
This fixes #57.
2015-06-02 13:11:04 -05:00
Mike Frysinger
c94c8288cd fix link to s6 website 2015-05-29 02:10:44 -04:00
Mike Gilbert
bcb9c44e73 man: Document the stopsig variable
This variable can be used to set the signal to send if the service is
using start-stop-daemon.

This fixes #56
2015-05-27 14:09:45 -05:00
William Hubbs
bbabf546f9 Document bash's handling of ulimit options
When bash is used in posix mode for the shell, the ulimit command uses
a block size of 512 bytes for the -c and -f options.

X-Gentoo-Bug: 549238
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=549238
2015-05-22 09:43:51 -05:00
William Hubbs
a7fcc1e264 S6: kick the scanner and sleep 1.5 seconds to avoid a race condition 2015-05-14 14:26:52 -05:00
William Hubbs
b79d058f16 s6: Use s6-svc -Dd to stop services
This allows us to get rid of the sleep call in the stop function. Also,
we set a configurable timeout value for stopping daemons.
2015-05-14 11:40:29 -05:00
William Hubbs
ddce529c71 More s6 fixes
- When no service link is in the scan directory, show the default
  stopped message.
- Do not remove the service link when stopping the service.
2015-05-13 16:51:55 -05:00
William Hubbs
e372f97beb Fix the s6 handling
This changes the default s6 service directory to /var/svc.d, also
it changes the code to work with the individual services instead of
forcing a rescan when a service is started or stopped.
2015-05-13 16:10:08 -05:00