summaryrefslogtreecommitdiff
path: root/sh
Commit message (Collapse)AuthorAge
* fix handling of /run for vserverWilliam Hubbs2012-07-02
| | | | | | | | | | 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
* local is only allowed in functionsChristian Ruppert2012-05-17
|
* move rc_svcdir to /run/openrc on Linux systemsWilliam Hubbs2012-05-14
| | | | | | | | | | | | | | | 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
* clarify the message about /proc being already mountedWilliam Hubbs2012-05-02
| | | | | | 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.
* fix references to functions.shWilliam Hubbs2012-04-26
| | | | | | | 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.
* Change the working directory for depend onlyWilliam Hubbs2012-04-26
| | | | | | 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.
* Revert "Revert "Let runscript enter the service dir before expand globs""William Hubbs2012-04-26
| | | | | | This reverts commit f971c4c0b5e45500f1255f2e076f2c101d2f9281. After further discussion, this is a good first step toward a fix, so I am putting it back.
* Revert "Let runscript enter the service dir before expand globs"William Hubbs2012-04-26
| | | | | This reverts commit 9d0dce35c3e46b4515499f3f0f1c47645be0bc48. This is being reverted due to the fix still being under discussion.
* Let runscript enter the service dir before expand globsChristian Ruppert2012-04-26
| | | | | | | | | | | | Enter the service directory, like gendeps.sh does, to make sure globs are expanded in it rather than in /. That makes sure that globbing like "need *" will end up in all files of the init.d directory. Signed-off-by: Christian Ruppert <idl0r@gentoo.org> Reported-by: Guenther Brunthaler <gb_about_gnu@gmx.net> X-Gentoo-Bug: 412677 X-Gentoo-Bug-URL: https://bugs.gentoo.org/412677
* sh/tmpfiles: Upstream clarifications & quoting fixes.Robin H. Johnson2012-03-12
| | | | | | | | | | | | Upstream has clarified via IRC: - hardcoding /usr/lib/ is an explicit choice. It should NOT consider $libdir at all. - The z/Z relabel types should call restorecon, not chcon. - Whitespace is not allowed in tmpfiles.d/*.conf path entries, but is allowed in globs results. Fixed quoting of path arguments for this. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* sh/tmpfiles: tmpfiles.d support.Robin H. Johnson2012-03-12
| | | | | | | | | | | | | | | This is the baseline support for tmpfiles.d. Still missing: - SELinux relabel, pending upstream clarification - LIBDIR vs multilib systems, pending upstream clarification - Whitespace in paths? - Clean support not implemented - "x" exclude type not implemented X-Gentoo-Bug: 396003 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=396003 Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* Runscript: allow extra_commands to be run in chrootsWilliam Hubbs2012-03-03
| | | | | | | | | | | | | The commands defined in the extra_commands variable do not depend on whether the service is stopped or started, so it is valid to run them in chroot environments. Also, add a note to the runscript man page about the commands in extra_commands being able to run whether or not the service is started. Reported-by: Robin Johnson <robbat2@gentoo.org> X-Gentoo-Bug: 406713 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=406713
* update ignore patternsWilliam Hubbs2012-02-20
|
* Fix early consolefont/termencoding usage vs rc_sysRobin H. Johnson2012-02-09
| | | | | | | | | | During early boot, the keywords were not being checked for consolefont/termencoding and they were running anyway when they should not be. X-Gentoo-Bug: 400549 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=400549 Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* cgroups: only create the cgroup when the service is being startedWilliam Hubbs2012-01-29
|
* Use "checkpath -W" instead of dir_writable()Christian Ruppert2012-01-28
|
* Check if /sys/fs/cgroup/openrc is writableChristian Ruppert2012-01-28
|
* cgroups: add all services to the openrc cgroupWilliam Hubbs2012-01-26
| | | | | This is a modified version of a patch originally submitted by Patrick Lauer <patrick@gentoo.org>.
* Make checks for writable directory posix compliantWilliam Hubbs2012-01-22
| | | | | | Reported-by: Maxim Kammerer <mk@de.su> X-Gentoo-Bug: 398931 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=398931
* drop the extra --pidfile optionWilliam Hubbs2012-01-17
|
* Use the "--make-pidfile" when command_background is usedChristian Ruppert2012-01-17
| | | | | | | | | | The start-stop-daemon "--make-pidfile" option is now used by default when using command_background, this requires a pidfile to be specified. Document command_background option. Reported-by: Giampaolo Tomassoni <giampaolo@tomassoni.biz> X-Gentoo-Bug: 399165 X-Gentoo-Bug-URL: https://bugs.gentoo.org/399165
* Add "retry" option for the stop() templateChristian Ruppert2011-12-31
|
* cgroups: remove references to the "openrc" cgroupWilliam Hubbs2011-12-19
| | | | Openrc will set up cgroups the way the kernel documentation recommends.
* Allow init scripts to be executed with a relative pathWilliam Hubbs2011-12-11
| | | | | | | | | | This was a regression that was caused by the fix for http://bugs.gentoo.org/show_bug.cgi?id=350910. I am reverting the commit that we said fixed that bug and re-opening it. Reported-By: Nathaniel <nathaniel@paust.us X-Gentoo-Bug: 392457 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=392457
* CGroups: create the openrc cgroup hierarchyWilliam Hubbs2011-11-20
| | | | | | 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.
* make shell math operations style more succulentMike Frysinger2011-11-19
| | | | | | | | | | | Convert the style: var=$((${var} + 1)) to: : $(( var += 1 )) The latter is easier to read imo. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* CGroups: /sys/fs/cgroups should be a tmpfsWilliam Hubbs2011-11-18
| | | | | | | | | | | 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.
* CGroups: fix group initializationWilliam Hubbs2011-11-18
| | | | | Make sure cpuset.cpus and cpuset.mems exist in the parent group before attempting to copy them to the new group.
* CGroups: finish initializing the CGroupWilliam Hubbs2011-11-17
| | | | | | When a CGroup is created, we need to copy cpuset.cpus and cpuset.mems from the new group's parent into the new group before we can attach any processes to it.
* Change RC_CGROUP to lower caseWilliam Hubbs2011-11-17
|
* Add CGroup supportPatrick Lauer2011-11-17
| | | | | X-Gentoo-Bug: 390297 X-Gentoo-Bug: http://bugs.gentoo.org/show_bug.cgi?id=390297
* add support for extra_stopped_commandsWilliam Hubbs2011-11-16
|
* Make sure we load external scripts before using eerrorWilliam Hubbs2011-11-02
| | | | | | Reported-by: Jochen Schlick <josch06@gmail.com> X-Gentoo-Bug: 388715 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=388715
* Use pattern rules instead of suffix rulesWilliam Hubbs2011-10-29
| | | | | | Rework the makefiles to use pattern rules instead of suffix rules. This is the preferred way to write implicit rules according to the gnu make manual.
* further clean up OS differences in makefilesMike Frysinger2011-10-20
| | | | | | No need for if() logic. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Make variable references in Makefiles consistentWilliam Hubbs2011-10-19
| | | | | | Some variable references were written as $(foo), but the majority were written as ${foo}. This commit changes all of the variable references to using braces.
* consolodate MakefilesWilliam Hubbs2011-10-18
| | | | | | | | | | The tree contained many operating system specific Makefiles which were being included in other Makefiles. This commit removes those and adds the code to the makefiles which included them using make's conditional processing. X-Gentoo-Bug: 387441 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=387441
* fix random typosMike Frysinger2011-10-16
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* runscript: simplify livecd-functions.sh loadingMike Frysinger2011-09-18
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Revert "Mount /run as early as possible"Christian Ruppert2011-09-12
| | | | | This reverts commit 5ed4d084d95608e40cb21888c18a8f381a44cd69. /run needs to be mounted after /proc.
* Use checkpath to create /run/lockWilliam Hubbs2011-09-07
|
* Mount /run as early as possibleWilliam Hubbs2011-09-06
| | | | | This commit moves the code that mounts /run to the earliest possible position in openrc.
* Improve processing of service directories and conf.d filesWilliam Hubbs2011-07-31
| | | | | | | | | | | symbolic links should not be followed in an attempt to work out the name of the service we are running. Also, @sysconfdir@/conf.d should be tried as a backup directory for configuration files. I would like to thank Robin Johnson for his input on this change. X-Gentoo-Bug: 350910 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=350910
* Runscript: print deprecation warning for opts variableWilliam Hubbs2011-07-26
| | | | | | | | | | | Openrc uses the extra_commands and extra_started_commands variables to list extra commands for services. Also, it supports the opts variable which is used to assist migration from baselayout-1. I am adding this warning to encourage switching from opts to extra_commands/extra_started_commands. I would like to remove support for opts eventually.
* The is_net_fs function should use extra_net_fs_listWilliam Hubbs2011-07-06
| | | | | This was pointed out to me by Morse on #gentoo-base, so I would like to thank him for the patch.
* fix issue with extra_net_fs_listWilliam Hubbs2011-07-05
| | | | | | | | | The extra_net_fs_list variable was not being included as it should have been for the net file systems because it was being expanded before it was set by the user. X-Gentoo-Bug: 374133 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=374133
* eat trailing whitespaceMike Frysinger2011-07-04
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* slight formatting changeWilliam Hubbs2011-07-02
| | | | Add a new line after "rc_runlevel()" for consistency.
* drop useless "All rights reserved" noticeMike Frysinger2011-06-29
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* Revert "remove functions.sh symbolic link in init.d"William Hubbs2011-06-27
| | | | This reverts commit f4407ac83d84e52c951b4a07640cdcad458010ea.