aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2011-11-09ssd: fix building when SYS_ioprio_set is missingMike Frysinger
Older glibc's might not provide this. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-11-07add auto detection for lxcWilliam Hubbs
Reported-by: Francesco Riosa <francesco+gentoo_bugzilla@pnpitalia.it> X-Gentoo-Bug: 384151 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=384151
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-09-08Use the real/actual path when looking for mountsChristian Ruppert
/proc/mounts contains real/actual paths so we should do the same in mountinfo.
2011-09-08Remove unused variableChristian Ruppert
2011-09-02Do not ignore return code for custom script functionsFlex
X-Gentoo-Bug: 380317 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=380317
2011-09-01Start-stop-daemon: remove call to pam_authenticateDiego
2011-08-22Libeinfo: do not suppress ewarn() messagesWilliam Hubbs
The ewarn() function was affected by the EINFO_QUIET environment variable which lead to warning messages being suppressed. Warnings should not be suppressed. Reported-by: Hanno Boeck <hanno@gentoo.org> X-Gentoo-Bug: 380073 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=380073
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: rename saveDir back to save to fix compile errorWilliam 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-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-06Rename rc_logger_path to rc_log_pathChristian 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-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-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-05Warn if deprecated commandline options are used for start-stop-daemonChristian Ruppert
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-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-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-04-27fix rc_service_extra_commands return valueJames Le Cuirot
If there were no extra commands, rc_service_extra_commands returned a list containing a single empty string. This changes that to return an empty list, which is more consistent with what you would expect. X-Gentoo-Bug: 360013 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=360013
2011-04-27fix list returned by rc_service_extra_commandsWilliam Hubbs
This function was returning the setting of the variable $opts, which is not correct. $opts was used in baselayout-1, but it is replaced by $extra_commands and $extra_started_commands in openrc. This does not appear to break backward compatibility since this function does not appear to be used anywhere in the openrc code. Thanks to James Le Cuirot for the original patch. X-Gentoo-Bug: 360013 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=360013
2011-04-09typo fixWilliam Hubbs
X-Gentoo-Bug: 217999 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=217999
2011-02-16new implementation of applet optionWilliam Hubbs
This reworks the implementation of the --applet option so that it is processed in run_applets() and does not require two calls to the getopts_long() function. It is based on code by Robin Johnson and Chris Richards. X-Gentoo-Bug: 351712 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=351712
2011-02-14make version option commonWilliam Hubbs
This reworks the code for the version option so that it is part of the parser loop and is a common option to all applets.
2011-02-14tests: filter valid parisc relocsMike Frysinger
Parisc generates a few relocs against internal symbols which are OK. X-Gentoo-Bug: 258913 X-Gentoo-Bug-URL: http://bugs.gentoo.org/258913 Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-02-07fix symlink targetWilliam Hubbs
The target for the symlinks in ${SBINDIR} (the same directory as the rc binary) was "rc". This is not correct; the target should be ${SBINDIR}/rc instead.
2011-02-04rework pam, ncurses and termcap include filesWilliam Hubbs
This allows error checking inside the included files instead of either including the appropriate file or a blank file. Also the blank file named .mk gets removed by this change.
2011-02-04remove unnecessary shell callsWilliam Hubbs
The main makefile, init.d/Makefile and src/librc/Makefile all contain several shell calls which can be handled as make conditionals. This switches them to conditionals.
2011-01-31selinux: replace symlinks with wrapper scriptsChris Richards
This needs to be done on selinux systems so the proper context can be set for each rc applet. X-Gentoo-Bug: 351712 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=351712
2011-01-31use immediate evaluation for shell callsWilliam Hubbs
This reworks the shell calls in the makefiles to use immediate evaluation and should improve parallel building. X-Gentoo-Bug: 289264 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=289264
2011-01-17librc: delete trailing newlinesMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-17tests: check for trailing blank newlinesMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-17Document that rc_sys_v{1,2} should not be used outside of OpenRC.Robin H. Johnson
2011-01-17Bug #351570: Fix hidden functions visibility for rc_deptree_load_file.Robin H. Johnson
2011-01-17Build cleanup: librc.funcs.hidden.list is generated by testsuite.Robin H. Johnson
2011-01-17Bug #351570: Hidden function fixes: rc_conf_value.Robin H. Johnson
Refactor rc_conf_value into librc for use in library context. Also requires moving: - rc_conf internal static - Defines: PROFILE_ENV, SYS_WHITELIST, USR_WHITELIST, RC_PATH_PREFIX moved to rc.h with new RC_ prefix added. - Defines: RC_CONF, RC_CONF_OLD moved to rc.h. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-01-17tests: check for common style issuesMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-17more whitespace cleanupMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-17start-stop-daemon: use termios.h rather than sys/termios.hMike Frysinger
POSIX specifies termios.h, not sys/termios.h. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-17Style fix: "char *foo" not "char* foo".Robin H. Johnson
2011-01-17Style fix: /* */ comments not // comments.Robin H. Johnson