Commit Graph

234 Commits

Author SHA1 Message Date
William Hubbs
e8e86b96dc fix issue with extra_net_fs_list
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-05 18:41:33 -05:00
Mike Frysinger
49f1a8702b eat trailing whitespace
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-04 18:27:00 -04:00
William Hubbs
9076baa573 slight formatting change
Add a new line after "rc_runlevel()" for consistency.
2011-07-02 23:33:23 -05:00
Mike Frysinger
d0bc4f20ad drop useless "All rights reserved" notice
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-06-29 19:46:31 -04:00
William Hubbs
e8413733c1 Revert "remove functions.sh symbolic link in init.d"
This reverts commit f4407ac83d.
2011-06-27 12:11:01 -05:00
William Hubbs
f4407ac83d remove functions.sh symbolic link in init.d 2011-06-27 11:56:12 -05:00
Mike Frysinger
7ca74d7636 fix underquoting of wrapped color stubs of exit status
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-03 20:41:43 -04:00
Mike Frysinger
3d56124ed1 only warn about /run if it exists
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-05-16 18:49:21 -04:00
William Hubbs
40341fcd7e do not run services if openrc did not boot the system
X-Gentoo-Bug: 364159
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=364159
2011-05-11 14:54:41 -05:00
William Hubbs
b712a9161f change udhcpc support to busybox udhcpc
This updates the udhcpc support to use busybox's udhcpc instead of the
stand alone version.

I would like to thank jackieku <kjackie@gmail.com> for assisting with
this update.

X-Gentoo-Bug: 205286
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=205286
2011-04-26 15:25:08 -05:00
William Hubbs
b6409feaac fix permissions for /run/lock
If /run/lock is a directory, set the ownership and permissions for it,
whether or not we created the directory.
2011-04-19 10:56:14 -05:00
Amadeusz Żołnowski
64ef51ab09 Add support for /run directory
This is a new directory for storing volatile runtime data.
See https://lwn.net/Articles/436012

X-Gentoo-Bug: 363971
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=363971
2011-04-18 15:26:13 -05:00
William Hubbs
1d63e85794 rework test for mounted /proc
The previous test assumed that we could always rely on the minor fault
counter to change between reads of /proc/self/stat, but we found that
this is not the case.

The new test compares two reads of /proc/self/environ for which we have
set the same environment variable to two different values.
If the comparison shows the two reads have the same contents, we know
that /proc is not working.

I would like to thank Robin Johnson and Mike Frysinger for their input
for this patch.

X-Gentoo-Bug: 348416
X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=348416
2011-03-24 19:14:16 -05: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
faa2df1159 more whitespace cleanup
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-01-17 04:49:12 -05: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
Robin Johnson
80d5f7d27b fix selinux context for rc-svcdir (bug #347503) 2010-12-03 23:49:34 -06:00
Jory A. Pratt
060b19e3e3 correction for unmounting volumes with weird characters, thanks Brant
Gurganus <brant@gurganus.name>
2010-10-28 20:35:09 -05:00
William Hubbs
d8a76d1bf6 allow net_fs_list to be extended but not replaced
This fixes bug #342825.
2010-10-27 09:00:02 -05:00
Jory A. Pratt
be6c0716ee surpress output of loadkeys, fix setfont path check 2010-09-30 07:33:52 -05:00
Roy Marples
4b333eaf36 Send SIGKILL after 2 failed SIGTERM when unmounting. 2010-03-16 21:34:48 +00:00
Juan RP
59b08643f1 Mount xenfs early so OpenRC can detect it. 2010-02-26 09:34:43 +00:00
Roy Marples
5c52e5beb5 Fix rc_${rc_svcname}_need.
Display config depends in service depend function also.
2010-02-20 21:48:06 +00:00
Roy Marples
ec38bbbdda If mounting tmpfs fails, try ramfs.
This is because buggy kernels always report tmpfs even when not present.
2009-11-20 00:04:32 +00:00
Roy Marples
3dc712e222 Allow init scripts to show their dependencies easier 2009-09-04 16:00:08 +01:00
Roy Marples
5acf0e9464 We need to use eval so we can pass "*" as an argument. 2009-05-26 22:36:53 +01:00
Roy Marples
c0fd1b49e4 Move non compiled libraries from /lib/rc to /libexec/rc
OpenRC version is now stored as plaintext in /libexec/rc/version

Plugins (cursplash, splashutils) will have to be re-compiled to pickup
the new directories. State data needs to be moved from /lib/rc/init.d
to /libexec/rc/init.d as well.
2009-05-23 20:38:12 +01:00
Roy Marples
7c81f74b60 Fix compile on NetBSD 2009-05-05 16:39:59 +01:00
Roy Marples
d441bf1585 Ignore more foo for the BSDs 2009-05-05 10:29:52 +01:00
Roy Marples
658a220638 Add (c) to Copyright 2009-05-01 15:11:40 +01:00
Roy Marples
b70501ef45 Go back to git 2009-04-30 15:05:39 +01:00
Roy Marples
824bb3aee3 Allow templates to define a stop signal 2009-04-27 13:32:13 +00:00
Roy Marples
2b866f264f Stop using needless {} in vars 2009-04-26 21:13:26 +00:00
Roy Marples
1d48183646 Try and set a keymap as early as possible, #169 2009-04-26 11:19:22 +00:00
Roy Marples
e2942e34af Use a bashism for a minor speedup in gendepends.sh 2009-04-19 16:47:09 +00:00
Roy Marples
802fe9709e Allow user to provide custom status function and still hook into the system one 2009-04-18 10:39:53 +00:00
Roy Marples
c9e24a0494 Move status to runscript.sh so init scripts can override it, #159
Return 32 if crashed, #163
2009-04-18 00:09:03 +00:00
Roy Marples
ace0b9653b Avoid needless forking, #165
Thanks to Natanael Copa.
2009-04-16 23:23:21 +00:00
Roy Marples
6bb44be2a3 We should always mount $RC_SVCDIR unless in a vserver or it's already mounted. 2009-01-29 13:38:15 +00:00
Roy Marples
2c98c5326a Punt .gitignore files. 2008-12-04 12:12:09 +00:00
Roy Marples
c064393f08 Save screen space. 2008-11-28 10:46:58 +00:00
Roy Marples
1deaa0fae0 Fix lib. 2008-11-13 09:35:00 +00:00
Roy Marples
0cca768b82 Mark the addon code as deprecated. 2008-11-12 19:19:56 +00:00
Roy Marples
42e6a95b1d Move romount to mount-ro and use the umount -r option as it's more reliable for / --bind mounts, Gentoo #239922. Thanks to Duncan. 2008-11-04 11:30:15 +00:00
Roy Marples
0af7d5bc20 Add a new shutdown runlevel, Gentoo #224537.
Split halt.sh into halt, killprocs, romount and savecache services.
The reboot runlevel is removed but mapped to shutdown.
The halt script should be moved to the sysvinit package.
2008-11-03 15:31:01 +00:00
Roy Marples
d6da8e8c48 sysinit is now a real runlevel that handles things like udev, dmesg and
mounting various bits in /dev and /sys.
init.sh JUST mounts /lib/rc/init.d (and /proc for Linux systems)
To make development of this easier we now return an empty RC_STRINGLIST
instead of a NULL for empty things.

If you don't have a udev init script installed, don't reboot your box OR
roll back to an older OpenRC version.
2008-10-10 08:37:21 +00:00
Roy Marples
247766695c Fix umounting reporting exit status, Gentoo #239922. 2008-10-09 16:36:42 +00:00
Roy Marples
6748c0e04e Allow forcefsck instead of gentoo=forcefsck on the kernel command line. 2008-09-22 12:32:35 +00:00
Roy Marples
a3c8706618 Allow OpenVZ to mount /sys and device managers, #102 2008-08-19 15:27:15 +00:00