aboutsummaryrefslogtreecommitdiff
path: root/init.d/sysfs.in
AgeCommit message (Collapse)Author
2017-11-28split cgroups mounting out of sysfsWilliam Hubbs
This is neceessary to allow cgroups to be mounted in an lxc/lxd container. Fixes https://github.com/openrc/openrc/issues/187
2017-10-09init.d/sysfs.in: fix reference to RC_LIBEXECDIRWilliam Hubbs
The sysfs init script referred to @LIBEXECDIR@ before this change, but it is better to refer to RC_LIBEXECDIR so that we get rid of a sed substitution.
2017-09-16sysfs: fix cgroup hybrid modeWilliam Hubbs
In hybrid mode, we should not try to mount cgroup2 if it is not available in the kernel. This fixes #164.
2017-09-14add support for control groups version 2William Hubbs
This is for #94.
2017-06-13init.d/sysfs: mount efivars read onlyWilliam Hubbs
This fixes #134.
2017-03-12init.d/sysfs.in: efivarfs tweaksWilliam Hubbs
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-08init.d/sysfs: drop modules completely from the dependenciesWilliam Hubbs
This is for #112.
2017-03-07init.d/sysfs: Do not load efivarfs moduleWilliam Hubbs
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.
2016-10-05init.d/sysfs: load efivarfs module when booting in efi mode:1William Hubbs
The presence of /sys/firmware/efi is used to indicate that the system was booted in efi mode.
2016-10-04init.d/sysfs: fix efivarfs module testWilliam Hubbs
2016-10-04init.d/sysfs: fix efivarfs handlingWilliam Hubbs
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-09-28init.d: Clean up some bad ewarn outputDoug Freed
2016-08-19Deprecate automatic loading of modulesWilliam Hubbs
In the hwclock, procfs and sysfs service scripts, we automatically attempt to load the kernel modules we need before we take any action. We shouldn't do this, because there are systems which do not use kernel modules and do not have the kmod package installed. With this change, we continue to load the modules ourselves, but we warn the admin that they need to be added to /etc/conf.d/modules or built into the kernel. In the future, this automatic loading will be dropped. X-Gentoo-Bug: 342313 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=342313
2016-07-31init.d: initial service adjustments for docker supportWilliam Hubbs
Add -docker keyword to the same scripts that have -lxc keyword.
2016-02-09sysfs: mount pstore when availableMike Frysinger
2015-12-21Convert OpenRC to a centralized copyright/license structureWilliam Hubbs
In the past, OpenRC was a hybrid of a centralized and file-scope license/copyright structure. I followed the instructions from the Software Freedom Law Center [1] to convert to a Centralized structure where possible, for easier future maintenance. [1] https://softwarefreedom.org/resources/2012/ManagingCopyrightInformation.html
2015-10-13sysfs: consolidate cgroup processing code in a single functionWilliam Hubbs
2015-10-06sysfs: use printf instead of echo to write to cgroup filesWilliam Hubbs
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-05-01Disable service scripts for systemd-nspawnMike Gilbert
This adds the -systemd-nspawn keyword to service scripts which are not intended to run in systemd-nspawn containers. This fixes #52. X-Gentoo-Bug: 548058 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=548058
2015-04-14Move SELinux mount to sysfs serviceWilliam Hubbs
The selinux file system is mounted under /sys, so move the code for it to the appropriate service. X-Gentoo-Bug: 546290 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=546290
2014-11-23Make sysfs behave like netmount and localmountWilliam Hubbs
sysfs now mounts all related sysfs file systems and returns success, like netmount and localmount. Also, we now check to make sure the cgroups are not mounted before we mount them. X-Gentoo-Bug: 530138 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=530138
2014-09-16Revert "sysfs: fix permissions on cgroup mounts"William Hubbs
This reverts commit 7a25491ced95e14b04b8fe6225171564c87fcde0. This was broken; I need to look further into it.
2014-09-16sysfs: fix permissions on cgroup mountsWilliam Hubbs
2014-08-22cgroups: fix cgroup subsystem mountingWilliam Hubbs
Originally, we aborted all of the cgroup setup if /sys/fs/cgroup/openrc was already mounted. This caused an issue in lxc containers, so we should always allow the subsystems to be mounted. X-Gentoo-Bug: 520606 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=520606
2014-07-16sysfs: restorecon after mounting /sysJason Zaman
X-Gentoo-Bug: 516956 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=516956
2014-07-14sysfs.in: fix indentationWilliam Hubbs
2014-06-30sysfs: Do not mount openrc cgroup if it is already mountedWilliam Hubbs
We were not checking to see if /sys/fs/cgroup/openrc was already mounted before we mounted it. This fixes that issue. Thanks to Robin Johnson <robbat2@gentoo.org> for pointing this out.
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-06-24efivarfs: Support EFI variable access in 3.10 kernels.Robin H. Johnson
In the 3.10 kernel, EFI variables are now provided by a dedicated filesystem that needs to be mounted. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2013-02-23Fix shebangs in services to point to the correct location of runscriptAndrew Gregory
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>
2013-02-01sysfs: mount the fusectl file systemWilliam Hubbs
Reported-by: vapier@gentoo.org X-Gentoo-Bug: 453740 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=453740
2012-10-02sysfs: add -lxc keywordWilliam Hubbs
The sysfs filesystem should not be mounted inside a linux container. Reported-by: permeakra@gmail.com X-Gentoo-Bug: 425790 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=425790
2012-07-26Bring Back prefix supportWilliam Hubbs
We now have a team member who is interested in OpenRC on prefix, so I am bringing it back to the main tree.
2012-07-03cgroups: allow users to turn off creation of controller cgroupsWilliam Hubbs
This adds a switch to not create the one-cgroup-per-controller setup of cgroups. reported-by: davidweb@klaftenegger.de X-Gentoo-Bug: 423317 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=423317
2012-02-21Remove prefix supportWilliam Hubbs
I spoke with the prefix team sometime back and was told that they do not have an interest in using OpenRC on prefix systems.
2012-01-27Cgroups: do not update mtab when mounting control groupsWilliam Hubbs
This is based on a patch submitted by the reporter; however, there was another mount command which needed -n as well so it was added to the patch. Reported-by: Ben Kohler <bkohler@gmail.com> X-Gentoo-Bug: 400967 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=400967
2012-01-26cgroups: make sure /sys/fs/cgroup is a mount pointWilliam Hubbs
We need to make sure this directory is a mount point before we add the control groups. Reported-by: Andrej Filipcic <andrej.filipcic@ijs.si> X-Gentoo-Bug: 400903 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=400903
2012-01-23Cgroups: activate the openrc control group release agentWilliam Hubbs
2012-01-23Cgroups: create openrc control groupWilliam Hubbs
This creates the "openrc" control group with no subsystems attached. The next step will be to add everything openrc starts to this group.
2012-01-05cgroups: turn on groups by defaultWilliam Hubbs
The control groups we create are the ones recommended by the linux kernel, so this should be on most of the time if cgroups are enabled in the kernel.
2011-12-29cgroups: default the size of the tmpfs to 10 mbWilliam Hubbs
2011-12-20cgroups: always mount the tmpfs on /sys/fs/cgroupWilliam Hubbs
X-Gentoo-Bug:395079 X-Gentoo-Bug-URL:https://bugs.gentoo.org/show_bug.cgi?id=395079
2011-12-20add rc_cgroup option to allow disabling of cgroup default setupPiotr Karbowski
Currently, cgroups are still in development, so we are not setting them up by default. However, this default will be changed in the future. This commit message and patch were updated by William Hubbs <williamh@gentoo.org>. X-Gentoo-Bug: 395079 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=395079
2011-12-19cgroups: remove references to the "openrc" cgroupWilliam Hubbs
Openrc will set up cgroups the way the kernel documentation recommends.
2011-12-18cgroups: mount cgroups suggested by the kernel documentationWilliam Hubbs
The linux kernel documentation suggests mounting a separate cgroup hierarchy for each subsystem you want to control/monitor. This changes the cgroups mounting code to do this.
2011-11-20CGroups: create the openrc cgroup hierarchyWilliam Hubbs
Openrc will create a cgroup hierarchy called openrc which will have all services it starts and all subsystems attached to it. If you need other groups/hierarchies, please use libcgroup.
2011-11-18CGroups: /sys/fs/cgroups should be a tmpfsWilliam Hubbs
The kernel documentation states that a cgroup file system should not be mounted here, but a tmpfs. This also means that we should not create a group for each process, but we should allow the user to specify which group a process should be assigned to. The rc_cgroup variable will be used for this purpose. For more information, see /usr/src/linux/Documentation/cgroups/cgroups.txt.
2011-10-26Add support for automounting configfs and cgroupfsAlexey Shvetsov
Signed-off-by: Alexey Shvetsov <alexxy@gentoo.org>
2011-06-29drop useless "All rights reserved" noticeMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-07-01We should use -feature instead of nofeature.Roy Marples
This matches the ifconfig and Gentoo USE flag syntax and is hopefully easier to read. Fixes #178.