aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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-28swclock: select a default reference fileWilliam Hubbs
If $RC_SVCDIR/shutdowntime does not exist, we need a default reference file. It is safe to use @PREFIX@/sbin/runscript for this purpose. Reported-By: Robin H. Johnson <robbat2@gentoo.org> X-Gentoo-Bug: 376249 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=376249
2011-07-26runscript: rename saveDir back to save to fix compile errorWilliam Hubbs
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-26mtab: fix test for a link to a location in /procWilliam Hubbs
/etc/mtab can be a link to a file in /proc. If it is, we should not attempt to update /etc/mtab. The original test used "! -w" as part of the test. This does not work since everything is writeable by root. Thanks to Robin Johnson for the suggestion of using readlink -f and the regular expression. Reported-By: junkmailnotread@yahoo.com X-Gentoo-Bug: 370037 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=370037
2011-07-23Mtab: fix typoWilliam Hubbs
2011-07-20rename save and save2 for clarityWilliam Hubbs
The names saveDir and saveLnk seem to better define how these variables are used.
2011-07-18Rewrite iproute2 addr argument parsing.Robin H. Johnson
This was originally to fix the fact that our code did not handle certain orders of arguments in conversion, but it was easier to rewrite the entire argument handling to support more options at the same time. Now supports all options documented in the ip manpage, including the IPv6-specific options that must be passed after the interface argument. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> Reported-by: Tony Vroon <chainsaw@gentoo.org> X-Gentoo-Bug: 366905 X-Gentoo-Bug-URL: https://bugs.gentoo.org/366905
2011-07-14Add warnings for the use of bash arraysWilliam Hubbs
Currently, we allow the use of bash arrays for some configuration settings. This is undocumented, so I want to remove the support from openrc. The first phase of this removal will be this commit which adds warnings to encourage people not to use bash arrays. X-Gentoo-Bug: 374875 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=374875
2011-07-13Add commit message information to style guideWilliam Hubbs
2011-07-13Fix rc_service_value_get() to return multiple lines as wellChristian Ruppert
As introduced in bug 372547 using service_get_value() in the init scripts or using rc_service_value_get() directly will only return one line. This patch fixes it by using the new rc_getfile() function, it returns even multiple lines. We're still using a char *, so the lines will be appended instead of added into new element. X-Gentoo-Bug: 372547 X-Gentoo-Bug-URL: http://bugs.gentoo.org/372547
2011-07-13Add a new function, bool rc_getfile(const char *, char **, size_t *)Mike Frysinger
<snip> Read the entire @file into the buffer and set @len to the size of the buffer when finished. For C strings, this will be strlen(buffer) + 1. Don't forget to free the buffer afterwards! </snip> We also fix bug 374899 by adding this new function. X-Gentoo-Bug: 374899 X-Gentoo-Bug-URL: http://bugs.gentoo.org/374899
2011-07-09Do not skip similar config optionsChristian Ruppert
OpenRC goes through the config and checks each option for duplicates. Lets say we're on "rc_logger" currently and its the last option in the config file and we previously defined rc_logger_path. It now goes through all previous config options and compares those against the current one "rc_logger" *but* it compares only the first N bytes, in this case strlen("rc_logger"). So it strips the _path from "rc_logger_path" which ends up into "rc_logger" and it compares that against the current one (also "rc_logger"), it would then simply override the previous definition. This patch fixes this behaviour to always compare the full option / variable names.
2011-07-07save and restore IFS correctlyKirill Elagin
X-Gentoo-Bug: 371141 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=371141
2011-07-06rc_log_path should be quotedWilliam Hubbs
2011-07-06Rename rc_logger_path to rc_log_pathChristian Ruppert
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-06Document the new rc_logger_path optionChristian Ruppert
2011-07-05Improve loggingChristian Ruppert
Add "e" (O_CLOEXEC) to all fopen() calls. Remove system() call and replace it by fopen() and friends. This also fixes bug 368933 X-Gentoo-Bug: 368933 X-Gentoo-Bug-URL: https://bugs.gentoo.org/368933
2011-07-05Don't write into optarg, this also fixes a compiler warning.Christian Ruppert
2011-07-04eat trailing whitespaceMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-04Bug 373808: init.d/modules skipped certain variable combinationsRobin H. Johnson
The version iteration code missed certain combinations: KV=1.2.3.4 skips: 1.2.3, 1 KV=1.2.3 skips: 1 Simplify the code to use a loop and build the list of versions directly instead of unique variables per version component. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-07-02slight formatting changeWilliam Hubbs
Add a new line after "rc_runlevel()" for consistency.
2011-06-30Add --startas/-a back to the optstringChristian Ruppert
X-Gentoo-Bug: 373609 X-Gentoo-Bug-URL: https://bugs.gentoo.org/373609
2011-06-29drop useless "All rights reserved" noticeMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-06-28Use RC_CONF instead of the hardcoded /etc/rc.confChristian Ruppert
2011-06-28net: ccwgroup: smooth up/down processMike Frysinger
We need to bring the link up ourselves after we've properly configured the device. The common code tries to bring the link up itself, but it does so before things are configured, and so it ends up failing. When shutting down, we need to wait for the kernel to finish destroying the interface. Otherwise, when doing a restart, openrc is quick enough to tell the kernel to destroy things, but then start trying to bring it back up before the kernel has finished. X-Gentoo-Bug: 367467 X-Gentoo-Bug-URL: http://bugs.gentoo.org/367467 Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-06-27Only print the deprecation warning for --chuid/-c when using itJoe Harvell
The deprecation warning has been printed when using the replecement functions as well, bug 373243.
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-24update bug reporting information in READMEWilliam Hubbs
2011-06-24localmount: make OIFS and CIFS local in stop functionKirill Elagin
X-Gentoo-Bug: 371141 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=371141
2011-06-23allow options to be passed to killall5William Hubbs
This allows options to be passed to killall5 by the killprocs script. This was added so that certain processes will not be killed during shutdown. x-Gentoo-Bug: 371625 x-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=371625
2011-06-19release openrc-0.8.3William Hubbs
2011-06-19fix comment in conf.d/consolefontWilliam Hubbs
X-Gentoo-Bug: 368277 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=368277
2011-06-18sysctl: do not make unknown keys fatalMike Frysinger
If unknown keys are found, currently sysctl would add all of its valid settings, but then leave itself marked as "stopped". Since this is not really what we want, make unknown keys a non-fatal error. Reported-by: Christian Ruppert <idl0r@gentoo.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-06-05Warn if deprecated commandline options are used for start-stop-daemonChristian Ruppert
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-06-03clean up gitignore filesMike Frysinger
Rather than listing explicit object files, ignore all of them in the whole tree. Also ignore patch/gdb related files throughout. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-06-02Don't set hostname on containers.Diego Elio Pettenò
LXC already provides a means to set the utsname/hostname of the system, so avoid overriding the user's configuration through hostname here. Signed-off-by: Diego Elio Pettenò <flameeyes@gmail.com>
2011-05-28rc-update: sort "show" outputMike Frysinger
X-Gentoo-Bug: 367305 X-Gentoo-Bug-URL: http://bugs.gentoo.org/367305 Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-05-28cc.mk: move debug.mk out of end MakefilesMike Frysinger
Since we always want debug.mk whenever we include cc.mk, move the include out of the Makefiles and into cc.mk itself. This also fixes an include order bug in rc/Makefile where debug.mk is included before cc.mk and breaks the default CFLAGS setup in cc.mk. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-05-28cc.mk: enable -g by defaultMike Frysinger
Can do no harm! Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-05-28librc: tweak style: foo () -> foo()Mike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-05-28rc: delete now unused local "i" variableMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-05-23Fix dirname calls in runscriptChristian Ruppert
runscript will try to get the dir and basename of a file/link in case it contains at least one slash. This patch gives a temporary copy of the path to the dirname() function since dirname() can modify its argument.
2011-05-17fix keymaps config file to show the correct variable nameWilliam Hubbs
X-Gentoo-Bug: 367283 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=367283
2011-05-16only warn about /run if it existsMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-05-16drop rc_sys funcs from removal scheduleMike Frysinger
The automagic detection isn't really problematic, and we allow people to easily override this when detection isn't possible. On the other hand, if people haven't configured rc_sys in their rc.conf, the lack of auto detection can easily lead to an unbootable system. Further, we're attempting to have a stable shared library ABI, which dropping funcs from is not feasible. Signed-off-by: Mike Frysinger <vapier@gentoo.org>