Commit Graph

1784 Commits

Author SHA1 Message Date
William Hubbs
cca7e9f7e1 use immediate evaluation for shell calls
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-31 14:05:57 -06:00
William Hubbs
c2529c1ed6 only support building with GNU Make
Update the documentation to state that openrc only works with gnu make.
This needs to be done in order to address the parallel build issue.

X-Gentoo-Bug: 289264
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=289264
2011-01-31 14:03:45 -06:00
William Hubbs
fa1fefb2bc add option to disable setting the system clock on boot for linux systems
This commit adds the clock_hctosys option which is used to skip setting
the system clock on boot and can be used with a modern linux kernel
which has the CONFIG_RTC_HCTOSYS option set to y.
I would like to thank Dimitris Mandalidis for the report and for the
patch to baselayout-1 on which my changes to openrc are based.

X-Gentoo-Bug: 248131
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=248131
2011-01-24 21:37:51 -06:00
William Hubbs
10ce67886d change local to run programs
This changes the local service so that it will run programs located in
@sysconfdir@/local.d instead of the local_start and local_stop functions
from @sysconfdir@/conf.d/local.

The advantage for the user is that these programs are not part
of the openrc package, so the user does not have to worry about them
being overwritten when openrc is upgraded.

X-Gentoo-Bug: 351465
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=351465
2011-01-20 12:50:29 -06:00
Robin H. Johnson
eebb2d1b9c test: You need to run "make" before "make check" will work.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-01-18 01:49:22 +00:00
Robin H. Johnson
e39178de28 docs: make check does not catch textfile trailing whitespace. 2011-01-18 01:48:53 +00:00
Robin H. Johnson
9c5aa8a3f7 Document all deprecated code for future removal. 2011-01-18 01:41:29 +00:00
Robin H. Johnson
80853f5dbc sh/init: Detect a mounted /proc without sleeping
Previously we checked if /proc was alive by reading /proc/uptime twice
with a 1 second sleep between calls, so that it had time to update.
This got a complaint of an entire 1 second delay, so we improve the
check to be much faster without sleep. We cannot continue to use
/proc/uptime as it only has a 10ms resolution.

X-Gentoo-Bug: 348416
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=348416
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-01-18 01:29:09 +00:00
Mike Frysinger
9ce957c3e7 librc: delete trailing newlines
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-17 20:05:13 -05:00
Mike Frysinger
c825a74dd1 tests: check for trailing blank newlines
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-17 20:04:53 -05:00
Robin H. Johnson
69abe1b2e8 Add removal schedule document for code trimming/deprecation. 2011-01-17 22:31:11 +00:00
Robin H. Johnson
164b8e4e04 Document that rc_sys_v{1,2} should not be used outside of OpenRC. 2011-01-17 22:30:40 +00:00
Robin H. Johnson
de8b4855d3 Bug #351570: Fix hidden functions visibility for rc_deptree_load_file. 2011-01-17 19:36:51 +00:00
Robin H. Johnson
f3f55f1f6d Build cleanup: librc.funcs.hidden.list is generated by testsuite. 2011-01-17 19:34:09 +00:00
Robin H. Johnson
2b7c2b8cf1 Bug #351570: Hidden function fixes: rc_conf_value.
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-17 19:29:45 +00:00
Mike Frysinger
6e876bca13 tests: check for common style issues
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-17 04:49:35 -05:00
Mike Frysinger
faa2df1159 more whitespace cleanup
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-17 04:49:12 -05:00
Mike Frysinger
711713d664 start-stop-daemon: use termios.h rather than sys/termios.h
POSIX specifies termios.h, not sys/termios.h.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-17 04:48:13 -05:00
Mike Frysinger
8b5e391afb start a STYLE file
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-17 04:23:09 -05:00
Mike Frysinger
1e73fd4b1e tests: setup env before reading local files
The local files we source might use local binaries (like eval_ecolors),
so setup the env first.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-17 04:07:24 -05:00
Mike Frysinger
f796269a1d dist.mk: add a standard "distcheck" target
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-17 04:03:25 -05:00
Robin H. Johnson
b2d0656814 Style fix: "char *foo" not "char* foo". 2011-01-17 08:46:41 +00:00
Robin H. Johnson
c0a3e25d48 Style fix: /* */ comments not // comments. 2011-01-17 08:43:40 +00:00
Robin H. Johnson
0c93f4df32 Style fix: "while (" not "while(". 2011-01-17 08:42:28 +00:00
Robin H. Johnson
b1fcf4ce9c Style fix: "if (" not "if(". 2011-01-17 08:41:02 +00:00
Robin H. Johnson
6804edfc85 Better error checking of argc for --applet call. 2011-01-17 08:39:44 +00:00
Robin H. Johnson
bfb87f2d51 Use xstrdup for style. 2011-01-17 08:34:03 +00:00
Robin H. Johnson
e6fc30da61 Clean up all trailing whitespace in src/. 2011-01-17 08:28:43 +00:00
Robin H. Johnson
49339525a9 Bug #351712: Implement --applet selection mode for SELinux wrappers.
In addition to detecting what multicall applet we want via argv[0],
provide an explicit override mode with a --applet initial argument.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-01-17 07:37:43 +00:00
Robin H. Johnson
1f578cdbad Add TODO item. 2011-01-17 06:59:37 +00:00
Robin H. Johnson
b00ad439a6 Add new option -F to rc-depend tool, so that we can debug user deptree files easily. 2011-01-17 06:53:50 +00:00
Robin H. Johnson
0e90ae266a Factor out new function rc_deptree_load_file to aid in debugging deptree files from users. Loads from a given filename instead of the hardcoded RC_DEPTREE_CACHE define. 2011-01-17 06:32:46 +00:00
Robin H. Johnson
b113ad49e9 Bug #351783: more documentation for rc_sys. But really see the OpenRC migration guide where this is covered. 2011-01-16 22:48:10 +00:00
Nathan Phillip Brink
a534b623b9 bug #351622: Use CFLAGS during linking.
Fix compilation on portage-multilib.
2011-01-14 16:40:58 -06:00
William Hubbs
882a4b7d69 bug 351523: fix deprecation date for rc_sys
The deprecation notice for automatic detection of the system type stated
that the automatic detection will be removed no later than 2010/03/01,
but it should state 2011/03/01.
2011-01-13 10:37:45 -06:00
William Hubbs
ac8b4be7c2 release openrc-0.7.0 2011-01-12 20:14:17 -06:00
Eray Aslan
66abbefd6c bug 351160: make openrc exit codes LSB compliant
* status on a stopped service now has a return code of 3 (was 1)
* starting an already started service now has a return code of 0 (was 1)
* stopping an already stopped service now has a return code of 0 (was 1)
2011-01-12 19:46:11 -06:00
William Hubbs
84eda608c8 bug 328675: add error checking to runscript.sh
runscript.sh needs to abort if the . command used to load
conf.d files and the service script does not execute successfully.
I would like to thank Mike Frysinger for his input wrt style on this
patch.
2011-01-12 19:21:48 -06:00
Mike Frysinger
e3905ed7bb update bug reporting information
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-08 18:35:08 -05:00
Chris Richards
92b6262ac7 Bug 349571 - SELinux fixes for bootmisc
- delete the contents of the $RC_LIBEXECDIR/console directory but not
  the directory itself.
  - direct error output from the chmod call for /tmp to /dev/null.
2011-01-06 18:20:53 -06:00
Robin H. Johnson
647df8cfe7 Make sure old rc_sys code never runs if the rc_sys variable exists.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-01-05 22:33:03 -08:00
Robin H. Johnson
6a0812645a Update manpage for mention of rc_sys purpose.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-01-05 22:27:35 -08:00
Robin H. Johnson
3d4d1ab14b Remove broken automatic LXC subsystem detection.
Any system using cgroups was being detected as an LXC system. This was
triggering on OpenVZ under RHEL6 as well as the "automated per tty task
groups" as discussed on the LKML.

All LXC users should now switch to the new rc_sys variable introduced in
the previous patch.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-01-05 22:09:34 -08:00
Robin H. Johnson
09f990a7c8 Implement explicit selection of subsystem types.
- Fixes bugs #347583, #349389, both of which were triggered by cgroups
  being detected as the LXC subsystem type.
- Makes it much easier to select "prefix" type.
- "rc -S" will now print a warning if you have not configured rc_sys in
  /etc/rc.conf
- All other semantics of rc_sys are unchanged in this patch.

Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
2011-01-05 22:09:34 -08:00
Robin H. Johnson
6df531d33d Document the order of the services within rc-status output. 2011-01-05 22:09:33 -08:00
William Hubbs
b2e9b91852 bug #349443: remove -openvz keyword from sysctl service
Openvz supports sysctl settings which are different from the host
settings, so allow the sysctl service to run for openvz systems.
2010-12-28 13:54:19 -06:00
Robin H. Johnson
f84d997d4c Move the ip rule extra output to verbose mode only, and support verbose output on addresses and routes. 2010-12-15 13:02:04 -08:00
Robin H. Johnson
346148ceb8 Fix pointopoint->peer for iproute. 2010-12-15 12:40:21 -08:00
Robin H. Johnson
12a91636f4 Fix pointopoint typo in old ifconfig setup. 2010-12-15 12:37:50 -08:00
Robin H. Johnson
7f7baa6c3c Bug #266659: we really need to allow peer, pointtopoint in parsing config lines. 2010-12-11 18:29:34 -08:00