summaryrefslogtreecommitdiff
path: root/sh
Commit message (Collapse)AuthorAge
* Rename runscript to openrc-runHEADmasterWilliam Hubbs2013-12-29
| | | | | | | | | | 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
* Rename the rc binary to openrcWilliam Hubbs2013-12-12
| | | | | | | | | | | 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
* tmpfiles.sh: small fixesWilliam Hubbs2013-12-10
| | | | | | | 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
* remove type commandWilliam Hubbs2013-12-02
| | | | | | 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.
* functions.sh: yesno: (mostly) fix eval logicMike Frysinger2013-11-30
| | | | | | | | 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>
* Fix the service-level rc_verbose settingWilliam Hubbs2013-10-31
| | | | | | | | | | | 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
* fix cgroup_cleanup functionWilliam Hubbs2013-09-27
| | | | | | | | 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
* Remove gentoo's net.* scriptsWilliam Hubbs2013-08-13
| | | | | | It has been determined that it will be best for gentoo's net.* scripts to be in a separate package to allow independent development. This package will be called netifrc and maintained by Gentoo.
* tmpfiles: do not signal an error if device nodes already existDirk Sondermann2013-07-27
| | | | | X-Gentoo-Bug: 478336 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=478336
* rc-cgroup: make sure the tasks file exists before adding the pidWilliam Hubbs2013-07-25
|
* tmpfiles: add --prefix and --exclude-prefix optionsWilliam Hubbs2013-07-25
|
* tmpfiles: make b and c commands set ownership and permissionsWilliam Hubbs2013-07-23
| | | | | The b and c commands in tmpfiles.sh were not setting ownership and permissions for the device nodes.
* typo fixHank Leininger2013-07-16
| | | | | X-Gentoo-Bug: 477006 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=477006
* cgroups: change '$$' to 0 for consistencyWilliam Hubbs2013-07-05
|
* Merge branch 'cgroup.systemd'William Hubbs2013-07-05
|\ | | | | | | | | Conflicts: sh/rc-cgroup.sh.in
| * Put a service on into a top hierarchy of each cgroupAlexander V Vershilov2013-07-01
| | | | | | | | | | | | | | | | | | | | | | 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.
* | cgroups: add support for systemd cgroup hierarchyWilliam Hubbs2013-06-25
|/ | | | | | | | 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.
* Fix quoting in cgroup-release-agentAlexander V Vershilov2013-06-16
|
* cgroups: hide messages about non-existent processesAlexander V Vershilov2013-06-16
|
* runscript.sh: run cgroup_cleanup automatically after stopWilliam Hubbs2013-05-25
|
* rc_cgroup.sh: fix typoAlexander V Vershilov2013-05-25
| | | | This fixes an incorrect variable assignment in cgroup_get_pids
* fix setfont detection in early startup on LinuxWilliam Hubbs2013-05-05
| | | | | | | 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.
* add cgroup cleanup supportAlexander Vershilov2013-04-25
| | | | | This adds the ability to kill all processes within a service's cgroup when that service is stopped or restarted.
* migrate-to-run: fix test for successful migrationWilliam Hubbs2013-04-03
| | | | | | | | | 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>
* Make fuser command time outWilliam Hubbs2013-03-12
| | | | | | | | | | | | 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: add support for the new X line typeWilliam Hubbs2013-03-11
| | | | | | | | | | | | 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
* include BINDIR and SBINDIR in the sanitized PATHAndrew Gregory2013-02-23
| | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
* Fix shebangs in services to point to the correct location of runscriptAndrew Gregory2013-02-23
| | | | | | | | 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>
* cgroups: major update to cgroups supportWilliam Hubbs2013-02-19
| | | | | | | | | | 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.
* cgroups: fix shebang line in rc-cgroup.shWilliam Hubbs2013-02-19
|
* make init.sh and init-early.sh honor SYSCONFDIRAndrew Gregory2013-02-16
| | | | | | | 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>
* consolefont: use setfont to save the current fontAndrew Gregory2013-02-16
| | | | | | | | | 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>
* Add module for cgroup processingAlexander Vershilov2013-02-16
| | | | | | 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
* rc-functions.sh: add ceph to net fs listMike Frysinger2013-01-16
| | | | | | | 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>
* typo fixWilliam Hubbs2013-01-15
|
* runscript: fix stopping changed service issuesWilliam Hubbs2013-01-15
| | | | | | | | | | | | | 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
* udhcpc: fix resolv.conf setting for domainWilliam Hubbs2012-12-22
| | | | | | | | | 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
* Set a default size for /run on LinuxWilliam Hubbs2012-12-22
| | | | | | Reported-by: alpiturchi@gmail.com X-Gentoo-Bug: 447076 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=447076
* init.sh.Linux: do not try to remove the /run/openrc symlinkWilliam Hubbs2012-12-19
| | | | | | | | | | | 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
* init-linux: Do not remove the $rc_libexecdir/init.d directoryWilliam Hubbs2012-12-07
| | | | | | Reported-by: toralf.foerster@gmx.de X-Gentoo-Bug: 446342 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=446342
* migrate-to-run: do not require a rebootWilliam Hubbs2012-12-06
| | | | | | | The script that migrates the @libexecdir@/rc/init.d directory to /run/openrc should not require a reboot. Reported-by: chainsaw@gentoo.org
* Do not add a prefix to the /run directoryWilliam Hubbs2012-12-03
| | | | | | | | 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
* migrate-to-run: Remove old RC_SVCDIR after unmounting tmpfsWilliam Hubbs2012-11-25
| | | | | | reporrrrted-by: netfab@gmail.com X-Gentoo-Bug: 443996 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=443996
* Support cpu usage management for LinuxAlexander Vershilov2012-11-12
| | | | | | | | | | | 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}.
* checkbashisms: Fix redirection order.Robin H. Johnson2012-11-07
| | | | Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* checkbashisms: clean up export statements.Robin H. Johnson2012-11-07
| | | | Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* tmpfiles: fix bashismWilliam Hubbs2012-11-06
| | | | reported-by: <pesa@gentoo.org>
* tmpfilesd: Doing both create+remove at the same time is valid.Robin H. Johnson2012-11-05
| | | | Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* tmpfilesd: parse arguments with spacesAndrew Gregory2012-10-21
| | | | | | | | 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>
* tmpfiles: return success from _f/_F on empty $argAndrew Gregory2012-10-21
| | | | | | | '[ -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>