aboutsummaryrefslogtreecommitdiff
path: root/sh
AgeCommit message (Collapse)Author
2015-11-05Add rc.conf.d supportWilliam Hubbs
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-10-13openrc-run.sh: fix new required_* tests to exit properlyWilliam Hubbs
2015-10-13typo fixWilliam Hubbs
X-Gentoo-Bug: 563010 X-Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=563010
2015-10-13openrc-run.sh: allow spaces in required_{files,dirs}William Hubbs
X-Gentoo-Bug: 562320 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=562320
2015-10-06cgroups: Add the hugetlb, net_cls and pids controllersAustin S. Hemmelgarn
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-06rc-cgroup.sh: Do not add leading spaces to cgroup valuesWilliam Hubbs
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-02start-stop-daemon.sh: complain in start if command is undefinedWilliam Hubbs
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-08-03tmpfiles: run restorecon on the entire pathJason Zaman
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-06-24tmpfiles: Recognize type 'v' (create btrfs subvol)Mike Gilbert
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-24Remove execute bit from tmpfiles.sh.inMike Gilbert
2015-05-14S6: kick the scanner and sleep 1.5 seconds to avoid a race conditionWilliam Hubbs
2015-05-14s6: Use s6-svc -Dd to stop servicesWilliam Hubbs
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-13More s6 fixesWilliam Hubbs
- 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-13Fix the s6 handlingWilliam Hubbs
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-11Add support for the s6 supervision suiteWilliam Hubbs
2015-05-11Rework supervisor integration frameworkWilliam Hubbs
The original way of doing this allowed users to change the supervisor in conf.d/*. This changes this so that the supervisor setup can be done in the service script itself.
2015-05-08Make the default start, stop and status functions overridableWilliam Hubbs
This will make it possible to add support for supervision suites such as runit and s6.
2015-05-01Add support for systemd-nspawn containersWilliam Hubbs
This adds support for running OpenRC in a container created by the systemd-nspawn utility. This fixes #52. X-Gentoo-Bug: 548058 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=548058
2015-04-27convert all references from runscript to openrc-runWilliam Hubbs
2015-04-21cgroups: use printf to write to cgroup filesWilliam Hubbs
This fixes #33.
2015-04-20Add binfmt service to sysinit runlevelWilliam Hubbs
This makes binfmt processing behave like tmpfiles processing which follows the same specification as systemd. This fixes #48. X-Gentoo-Bug: 545162 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=545162
2015-04-08Fix tmpfiles processingWilliam Hubbs
Tmpfiles.d processing had /run overriding /usr/lib and /etc, but this is not correct. The correct order, from lowest to highest, for tmpfiles processing is: * /usr/lib/tmpfiles.d/*.conf * /run/tmpfiles.d/*.conf * /etc/tmpfiles.d This means /run/tmpfiles.d/*.conf can override /etc/tmpfiles.d/*.conf, but /etc/tmpfiles.d/*.conf can override both of them. This fixes #49.
2015-03-29Fix rc_verbose processingWilliam Hubbs
We were processing the rc_verbose setting before we sourced the configuration file where it was set; this fixes the issue. Fixes #46
2015-01-12Add description for cgroup_cleanupWilliam Hubbs
X-Gentoo-Bug: 535184 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=535184
2014-10-23add missing files for GNU/HurdSvante Signell
2014-10-22Add missing files for GNU/kFreeBSDGabriele Giacone
2014-10-20runscript.sh: add chroot supportWilliam Hubbs
This adds support for a chroot variable which will be passed to the start-stop-daemon --chroot switch to runscript.sh when starting a daemon. This also needs to be saved so it can be used in locating the pid file when stopping the daemon. X-Gentoo-Bug: 524388 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=524388
2014-09-11Use exception-based approach for cgroup/ulimit setupRoy Marples
Note from William Hubbs: I spoke with Roy about this, and he pointed out that user-defined functions may need the limits applied, so it is better to go with a method that uses exceptions to determine which functions apply the limits. X-Gentoo-Bug: 522408 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=522408
2014-09-11runscript: move verbose mode setting near debug settingWilliam Hubbs
2014-08-27tmpfiles.sh: add support for C actionAndrew Gregory
Recursively copies files or directories. Added by systemd in 849958d1.
2014-08-27tmpfiles.sh: add support for + modifierAndrew Gregory
systemd added support for b+, c+, p+, and L+ in 2e78fa79 and 1554afae to remove the target path if it already exists.
2014-08-13tmpfiles: fix relabel to run restorecon before chown and chmodWilliam Hubbs
2014-08-13tmpfiles: Move relabelling before any other calls for device nodesJason Zaman
Device nodes are normally never device_t so this type does not have many permissions. After the mknod, the device should have its label corrected before any other operations (like chmod).
2014-08-07tmpfiles.sh: do not use installJason Zaman
install is in /usr which causes problems if /usr is not mounted. Instead, checkpath and "mkdir -p" can do everything required and are both available before /usr is mounted. Since checkpath also handles selinux labels correctly, _restorecon after is not required. X-Gentoo-Bug: 503408 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=503408
2014-07-16tmpfiles: set the proper SELinux contextJason Zaman
Restore the label on the created file / dir based on the policy fcontexts. X-Gentoo-Bug: 516956 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=516956
2014-07-10Style FixesWilliam Hubbs
2014-07-10cgroups: only run cgroup setup when starting a serviceAlexander V Vershilov
Status call should not set limits as it requires root permissions, also this is not safe, as current process may reach limitation. Solution is to set limits and move process to service cgroup only on start. X-GENTOO-BUG: 500364 X-GENTOO-BUG-URL: https://bugs.gentoo.org/show_bug.cgi?id=500364
2014-06-20tmpfiles.sh: fix comment processingWilliam Hubbs
If you happened to format a comment with no white space after the '#', it was not being processed. Reported-by: consus@gmx.com X-Gentoo-Bug: 511804 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=511804
2014-06-20sh/tmpfiles.sh: license under 2-clause BSDRobin H. Johnson
As the author of our tmpfiles.sh script, I hereby license it under 2-clause BSD, like the rest of openrc. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2014-03-27tmpfiles: add support for --boot optionAndrew Gregory
For compatibility with systemd-tmpfiles. Fixes #17 Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2014-03-27tmpfiles: ignore all files starting with systemd-Andrew Gregory
systemd recently moved creation of /run/nologin to systemd-nologin.conf Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2014-01-18init-Linux.sh: do not mount /run with nosuidWilliam Hubbs
This is so that we will be consistent with the systemd spec forr the /run directory mentioned in this wiki article: http://www.freedesktop.org/wiki/Software/systemd/InitrdInterface/
2014-01-11Merge init-common-post code into BSD init scriptWilliam Hubbs
This code is no longer part of the initialization script for Linux, so we can move it into the init script for *BSD which is the only place it is used.
2013-12-29Rename runscript to openrc-runWilliam Hubbs
This was requested by Debian, because the minicom software, which is available on Debian and other distros, has a binary named runscript. We are keeping a backward compatibility symlink for now, but this allows Debian or any other distro to safely remove the symlink. X-Gentoo-Bug: 494220 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=494220
2013-12-12Rename the rc binary to openrcWilliam Hubbs
Debian requested this rename due to the "rc" binary conflicting with the "rc" binary from the plan 9 shell. We also add a deprecation warning to the binary when it is run as rc to encourage users to switch to openrc instead. X-Gentoo-Bug: 493958 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=493958
2013-12-10tmpfiles.sh: small fixesWilliam Hubbs
Change "sort | uniq" to "sort -u". Also, change `...` to $(...). X-Gentoo-Bug: 493736 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=493736
2013-12-02remove type commandWilliam Hubbs
The posix equivalent of the type command is "command -v", so now we use that. Thanks to Jonathan Callen <jcallen@gentoo.org> for informing me wrt the fix.
2013-11-30functions.sh: yesno: (mostly) fix eval logicMike Frysinger
We need to quote the expansion. X-Gentoo-Bug: 475032 X-Gentoo-Bug: https://bugs.gentoo.org/475032 Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-10-31Fix the service-level rc_verbose settingWilliam Hubbs
This commit fixes the rc_verbose setting so that it is honored if it is set for an individual service. Thanks to whissi@whissi.de for the original patch; this one is slightly modified to be more posix. X-Gentoo-Bug: 489358 X-Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=489358
2013-09-27fix cgroup_cleanup functionWilliam Hubbs
The yesno test for rc_cgroup_cleanup belongs at the point where this function is called from runscript, not in the function itself. X-Gentoo-Bug: 486210 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=486210