aboutsummaryrefslogtreecommitdiff
path: root/sh
AgeCommit message (Collapse)Author
2012-04-26fix references to functions.shWilliam Hubbs
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.
2012-04-26Change the working directory for depend onlyWilliam Hubbs
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.
2012-04-26Revert "Revert "Let runscript enter the service dir before expand globs""William Hubbs
This reverts commit f971c4c0b5e45500f1255f2e076f2c101d2f9281. After further discussion, this is a good first step toward a fix, so I am putting it back.
2012-04-26Revert "Let runscript enter the service dir before expand globs"William Hubbs
This reverts commit 9d0dce35c3e46b4515499f3f0f1c47645be0bc48. This is being reverted due to the fix still being under discussion.
2012-04-26Let runscript enter the service dir before expand globsChristian Ruppert
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
2012-03-12sh/tmpfiles: Upstream clarifications & quoting fixes.Robin H. Johnson
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>
2012-03-12sh/tmpfiles: tmpfiles.d support.Robin H. Johnson
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>
2012-03-03Runscript: allow extra_commands to be run in chrootsWilliam Hubbs
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
2012-02-20update ignore patternsWilliam Hubbs
2012-02-09Fix early consolefont/termencoding usage vs rc_sysRobin H. Johnson
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>
2012-01-29cgroups: only create the cgroup when the service is being startedWilliam Hubbs
2012-01-28Use "checkpath -W" instead of dir_writable()Christian Ruppert
2012-01-28Check if /sys/fs/cgroup/openrc is writableChristian Ruppert
2012-01-26cgroups: add all services to the openrc cgroupWilliam Hubbs
This is a modified version of a patch originally submitted by Patrick Lauer <patrick@gentoo.org>.
2012-01-22Make checks for writable directory posix compliantWilliam Hubbs
Reported-by: Maxim Kammerer <mk@de.su> X-Gentoo-Bug: 398931 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=398931
2012-01-17drop the extra --pidfile optionWilliam Hubbs
2012-01-17Use the "--make-pidfile" when command_background is usedChristian Ruppert
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
2011-12-31Add "retry" option for the stop() templateChristian Ruppert
2011-12-19cgroups: remove references to the "openrc" cgroupWilliam Hubbs
Openrc will set up cgroups the way the kernel documentation recommends.
2011-12-11Allow init scripts to be executed with a relative pathWilliam Hubbs
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
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-19make shell math operations style more succulentMike Frysinger
Convert the style: var=$((${var} + 1)) to: : $(( var += 1 )) The latter is easier to read imo. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
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-11-18CGroups: fix group initializationWilliam Hubbs
Make sure cpuset.cpus and cpuset.mems exist in the parent group before attempting to copy them to the new group.
2011-11-17CGroups: finish initializing the CGroupWilliam Hubbs
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.
2011-11-17Change RC_CGROUP to lower caseWilliam Hubbs
2011-11-17Add CGroup supportPatrick Lauer
X-Gentoo-Bug: 390297 X-Gentoo-Bug: http://bugs.gentoo.org/show_bug.cgi?id=390297
2011-11-16add support for extra_stopped_commandsWilliam Hubbs
2011-11-02Make sure we load external scripts before using eerrorWilliam Hubbs
Reported-by: Jochen Schlick <josch06@gmail.com> X-Gentoo-Bug: 388715 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=388715
2011-10-29Use pattern rules instead of suffix rulesWilliam Hubbs
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.
2011-10-20further clean up OS differences in makefilesMike Frysinger
No need for if() logic. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-10-19Make variable references in Makefiles consistentWilliam Hubbs
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.
2011-10-18consolodate MakefilesWilliam Hubbs
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
2011-10-16fix random typosMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-09-18runscript: simplify livecd-functions.sh loadingMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-09-12Revert "Mount /run as early as possible"Christian Ruppert
This reverts commit 5ed4d084d95608e40cb21888c18a8f381a44cd69. /run needs to be mounted after /proc.
2011-09-07Use checkpath to create /run/lockWilliam Hubbs
2011-09-06Mount /run as early as possibleWilliam Hubbs
This commit moves the code that mounts /run to the earliest possible position in openrc.
2011-07-31Improve processing of service directories and conf.d filesWilliam Hubbs
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
2011-07-26Runscript: print deprecation warning for opts variableWilliam Hubbs
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.
2011-07-06The is_net_fs function should use extra_net_fs_listWilliam Hubbs
This was pointed out to me by Morse on #gentoo-base, so I would like to thank him for the patch.
2011-07-05fix issue with extra_net_fs_listWilliam Hubbs
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
2011-07-04eat trailing whitespaceMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-02slight formatting changeWilliam Hubbs
Add a new line after "rc_runlevel()" for consistency.
2011-06-29drop useless "All rights reserved" noticeMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-06-27Revert "remove functions.sh symbolic link in init.d"William Hubbs
This reverts commit f4407ac83d84e52c951b4a07640cdcad458010ea.
2011-06-27remove functions.sh symbolic link in init.dWilliam Hubbs
2011-06-03fix underquoting of wrapped color stubs of exit statusMike Frysinger
X-Gentoo-Bug: 369911 X-Gentoo-Bug-URL: http://bugs.gentoo.org/369911 Reported-by: Steve Dibb <beandog@gentoo.org> Reported-by: Christian Ruppert <idl0r@gentoo.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-05-16only warn about /run if it existsMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-05-11do not run services if openrc did not boot the systemWilliam Hubbs
X-Gentoo-Bug: 364159 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=364159