Age | Commit message (Collapse) | Author |
|
This change will fix unwanted cgroup inheriting from user cgroups,
and fixes issues with systemd cgroup tracking by logind.
However this fix can lead to incorrect work for some user cgroup
controllers - so more advanced solution, that coveres such cases
will be created later.
Thanks to Fabio Erculiani (lxnay) for testing and general idea.
|
|
The systemd cgroup hierarchy support is being added so we can run
logind outside of systemd. This is needed because software that was
using consolekit is now migrating to logind.
We do not create this hierarchy, we just add services to it if it
exists.
|
|
|
|
|
|
|
|
This fixes an incorrect variable assignment in cgroup_get_pids
|
|
Most of the time, setfont is an external command (part of the kbd
package), but it can also be a builtin if busybox is being used. This
corrects the test in early startup to work for both cases. I would like
to thank Steve L. for pointing this out.
|
|
This adds the ability to kill all processes within a service's cgroup
when that service is stopped or restarted.
|
|
This script originally tested the file system type for the source
location of the data we were migrating to determine if the migration was
complete. Now we test the destination, and if the softlevel file is
there the migration was successful.
Reported-by: Piotr Karbowski <piotr.karbowski@gmail.com>
|
|
This avoids situations in which fuser hangs because of open files on
remote file systems when the remote system goes down.
I have also passed this bug on to the maintainers of psmisc since it
should really be fixed in fuser.
This is based on a patch submitted by evermind@tuxfamily.org
Reported-by: evermind@tuxfamily.org
X-Gentoo-Bug: 455458
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=455458
|
|
tmpfiles now has a new line type, X, which is similar to the x line type
used by the cleanup function.
This is not supported yet by OpenRc, because we do not have the cleanup
function in tmpfiles.sh, so I have added a dummy procedure for it so
we don't get complaints about this line type.
Reported-by: mgorny@gentoo.org
X-Gentoo-Bug: 460880
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=460880
|
|
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
|
|
SBINDIR and BINDIR can be set independently of PREFIX. This fixes
broken shebangs in service files when SBINDIR is set to something other
than PREFIX/sbin
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
|
|
This reworks cgroups support so we have one variable in rc.conf for each
controller instead of each setting.
Also we add support for all of the possible cgroup controllers.
I would like to thank Alexander Vershilov for his help with testing and
reworking this code.
|
|
|
|
Fixes hardcoded paths that break when built with SYSCONFDIR
set to anything other than /etc/
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
|
|
Using setfont directly to save the font prevents breakage
when a distro stores consolefonts in a location other than
/usr/share/consolefonts such as Arch which stores them in
/usr/share/kbd/consolefonts
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
|
|
sh/rc-cgroup.sh.in: new script to handle cgroup processing
sh/rc-cgroup.sh.in: do not use grep or cut (modification by William Hubbs)
sh/runscript.sh.in: use the cgroup script
|
|
X-Gentoo-Bug: 452552
X-Gentoo-Bug-URL: https://bugs.gentoo.org/452552
Reported-by: Tomas Mozes <hydrapolic@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
|
|
If an init script or service was upgraded while it was running and the
settings for the pid file, command and process name were changed, it
would not be possible to stop the old service.
Runscript now saves the values it used to start the service and re-uses
them to stop the service.
Reported-by: flameeyes@gentoo.org
X-Gentoo-Bug: 434032
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=434032
|
|
The value that was supposed to be in the domain setting was being added
incorrectly to search.
Reported-by: bug@mejor.pl
X-Gentoo-Bug: 446862
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=446862
|
|
Reported-by: alpiturchi@gmail.com
X-Gentoo-Bug: 447076
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=447076
|
|
In order to make migration from /lib*/rc/init.d to /run/openrc possible
without rebooting, the migration script creates a symlink from
/run/openrc to /lib*/rc/init.d. We were trying to remove it on the next
reboot, but this is not possible since / is ro when /run is mounted.
Reported-by: fturco@fastmail.fm
X-Gentoo-Bug: 447678
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=447678
|
|
Reported-by: toralf.foerster@gmx.de
X-Gentoo-Bug: 446342
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=446342
|
|
The script that migrates the @libexecdir@/rc/init.d directory to
/run/openrc should not require a reboot.
Reported-by: chainsaw@gentoo.org
|
|
This doesn't affect us on gentoo, but on archlinux, which has done the
/usr merge, OpenRC was looking for /run under PREFIX. /run is always at
the root level, so it shouldn't have prefix appended to it.
Reported-by: udeved@openrc4arch.site40.net
|
|
reporrrrted-by: netfab@gmail.com
X-Gentoo-Bug: 443996
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=443996
|
|
This commit was modified by William Hubbs as follows:
- The paths in the cgroup fs were put into variables to ease
maintenance.
- Documentation was added to rc.conf.Linux.
- The services were added originally to openrc/svcname cgroups under the
controller cgroups, but this left an "openrc" cgroup which was unused.
Now they are added to individual cgroups with the name openrc_${RC_SVCNAME}.
|
|
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
|
|
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
|
|
reported-by: <pesa@gentoo.org>
|
|
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
|
|
systemd allows the final arg in tmpfiles to contain spaces. Using the read()
call to set the variables includes all trailing components in $arg so it
doesn't get cut off.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
|
|
'[ -n "$arg" ] && _w' causes _f/_F to return the failure from the test when
$arg is empty. Inverting the test causes the test and _f/_F to return success.
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
|
|
This file contains definitions specific to systemd, so we should not
process it.
Reported-by: <andrew.gregory.8@gmail.com>
|
|
We should use the "command" shell builtin to execute a binary from
within the wrapper with the same name. Hard coding the path to the
binary makes our test suite fail.
|
|
Now that the tmpfiles.d code is more tested, actually call it from
init.d. It assumes that /run is already available when it runs.
Please note it runs TWICE.
- During sysinit, ideally just after /dev/shm is created, but before
udev has started. After udev is also acceptable, but not ideal.
- During boot, ideally just after localmount has completed.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
|
|
Dry-run with more detail is more useful this way.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
|
|
By design, restart is hard coded to run stop followed by start along
with all of the pre/post functions associated with them. Restart doesn't
need its own pre/post functions since it is possible to make any
function in an init script behave differently for a restart command by
testing against the RC_CMD environment variable.
|
|
|
|
Some optional arguments were missing quotes in the tests, so produced
spurious warnings.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
|
|
Mount can't be used in vservers, but /run is still needed. So we create
the directory and clear it out instead of mounting a tmpfs in that
situation.
reported-by: <patrick@gentoo.org>
X-Gentoo-Bug: 423739
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=423739
|
|
|
|
If you are not using linux, this should not affect you.
If you are using linux, from this point forward, openrc requires the
/run directory to be a mounted tmpfs. If it is, you can run
@LIBEXECDIR@/sh/migrate-to-run.sh as root to migrate your dependency
tree and state information to the new location. If it is not, you must
create the /run directory as root with permissions 755 then reboot your
system.
reported-by: Maxim Kammerer <mk@dee.su>
X-Gentoo-Bug: 401059
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=401059
|
|
This message was being taken by some users as an error, so I have
removed the part about "skipping..." Hopefully this will make the
message less alarming.
|
|
There were a couple of places where we were sourcing functions.sh in
@SYSCONFDIR@/init.d. This is only a backward compatibility symlink, so
it should not be used for openrc. The correct place to source this from
is @LIBEXECDIR@/sh.
|
|
We already have a special case for depend processing, so we should
change the working directory there only. This prevents us from forcing
all init scripts to be run in the init directory.
|
|
This reverts commit f971c4c0b5e45500f1255f2e076f2c101d2f9281.
After further discussion, this is a good first step toward a fix, so I
am putting it back.
|
|
This reverts commit 9d0dce35c3e46b4515499f3f0f1c47645be0bc48.
This is being reverted due to the fix still being under discussion.
|