summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-03-02 21:13:21 +0000
committerRoy Marples <roy@marples.name>2008-03-02 21:13:21 +0000
commita12dbdc6c93a7d63591610378e3e570b7c7d2143 (patch)
tree22cd968f4bb32bedf82e091c9ffee798d247c51e
parent7c092fbc7904be18510eed08c72cbad974db8adc (diff)
downloadopenrc-a12dbdc6c93a7d63591610378e3e570b7c7d2143.tar.gz
openrc-a12dbdc6c93a7d63591610378e3e570b7c7d2143.tar.bz2
openrc-a12dbdc6c93a7d63591610378e3e570b7c7d2143.tar.xz
Don't check for root in prefix.
-rw-r--r--init.d.BSD/hostid.in (renamed from init.d.BSD/hostid)2
-rw-r--r--init.d.BSD/moused.in (renamed from init.d.BSD/moused)2
-rw-r--r--init.d.BSD/newsyslog.in (renamed from init.d.BSD/newsyslog)0
-rw-r--r--init.d.BSD/pf.in (renamed from init.d.BSD/pf)2
-rw-r--r--init.d.BSD/rarpd.in (renamed from init.d.BSD/rarpd)0
-rw-r--r--init.d.BSD/rc-enabled.in (renamed from init.d.BSD/rc-enabled)1
-rw-r--r--init.d.BSD/rpcbind.in (renamed from init.d.BSD/rpcbind)0
-rw-r--r--[-rwxr-xr-x]init.d.BSD/savecore.in (renamed from init.d.BSD/savecore)2
-rw-r--r--init.d.BSD/swap-blk.in (renamed from init.d.BSD/swap-blk)2
-rw-r--r--init.d.BSD/sysctl.in (renamed from init.d.BSD/sysctl)1
-rw-r--r--init.d.BSD/syslogd.in (renamed from init.d.BSD/syslogd)0
-rw-r--r--init.d.FreeBSD/clock.in (renamed from init.d.FreeBSD/clock)2
-rw-r--r--init.d.FreeBSD/devd.in (renamed from init.d.FreeBSD/devd)2
-rw-r--r--init.d.FreeBSD/dumpon.in (renamed from init.d.FreeBSD/dumpon)2
-rw-r--r--init.d.FreeBSD/ipfw.in (renamed from init.d.FreeBSD/ipfw)0
-rw-r--r--init.d.FreeBSD/mixer.in (renamed from init.d.FreeBSD/mixer)0
-rw-r--r--init.d.FreeBSD/nscd.in (renamed from init.d.FreeBSD/nscd)0
-rw-r--r--init.d.FreeBSD/powerd.in (renamed from init.d.FreeBSD/powerd)0
-rw-r--r--init.d.FreeBSD/syscons.in (renamed from init.d.FreeBSD/syscons)2
-rw-r--r--[-rwxr-xr-x]init.d.Linux/clock.in (renamed from init.d.Linux/clock)2
-rw-r--r--[-rwxr-xr-x]init.d.Linux/consolefont.in (renamed from init.d.Linux/consolefont)2
-rw-r--r--[-rwxr-xr-x]init.d.Linux/keymaps.in (renamed from init.d.Linux/keymaps)2
-rw-r--r--[-rwxr-xr-x]init.d.Linux/modules.in (renamed from init.d.Linux/modules)2
-rw-r--r--init.d.Linux/mtab.in (renamed from init.d.Linux/mtab)1
-rw-r--r--[-rwxr-xr-x]init.d.Linux/numlock.in (renamed from init.d.Linux/numlock)1
-rw-r--r--init.d.Linux/procfs.in (renamed from init.d.Linux/procfs)3
-rw-r--r--init.d.Linux/sysctl.in (renamed from init.d.Linux/sysctl)2
-rw-r--r--init.d.NetBSD/ttys.in (renamed from init.d.NetBSD/ttys)6
-rw-r--r--init.d.NetBSD/wscons.in (renamed from init.d.NetBSD/wscons)1
-rw-r--r--[-rwxr-xr-x]init.d/bootmisc.in (renamed from init.d/bootmisc)1
-rw-r--r--init.d/fsck.in (renamed from init.d/fsck)2
-rw-r--r--[-rwxr-xr-x]init.d/hostname.in (renamed from init.d/hostname)4
-rw-r--r--[-rwxr-xr-x]init.d/local.in (renamed from init.d/local)0
-rw-r--r--[-rwxr-xr-x]init.d/localmount.in (renamed from init.d/localmount)2
-rw-r--r--[-rwxr-xr-x]init.d/netmount.in (renamed from init.d/netmount)2
-rw-r--r--init.d/root.in (renamed from init.d/root)2
-rw-r--r--init.d/swap.in (renamed from init.d/swap)2
-rw-r--r--[-rwxr-xr-x]init.d/urandom.in (renamed from init.d/urandom)2
-rw-r--r--src/rc/rc.c2
-rw-r--r--src/rc/runscript.c2
40 files changed, 42 insertions, 21 deletions
diff --git a/init.d.BSD/hostid b/init.d.BSD/hostid.in
index 3eb4c4f..7d093a4 100644
--- a/init.d.BSD/hostid
+++ b/init.d.BSD/hostid.in
@@ -9,7 +9,7 @@ depend()
{
need root
before devd net
- keyword nojail
+ keyword nojail noprefix
}
_set()
diff --git a/init.d.BSD/moused b/init.d.BSD/moused.in
index 94c6812..9e8c20f 100644
--- a/init.d.BSD/moused
+++ b/init.d.BSD/moused.in
@@ -16,7 +16,7 @@ depend()
{
need localmount
after bootmisc
- keyword nojail
+ keyword nojail noprefix
}
start()
diff --git a/init.d.BSD/newsyslog b/init.d.BSD/newsyslog.in
index 4f7ade8..4f7ade8 100644
--- a/init.d.BSD/newsyslog
+++ b/init.d.BSD/newsyslog.in
diff --git a/init.d.BSD/pf b/init.d.BSD/pf.in
index 0b6208e..daca82a 100644
--- a/init.d.BSD/pf
+++ b/init.d.BSD/pf.in
@@ -11,7 +11,7 @@ extra_started_commands="reload"
depend() {
need localmount
- keyword nojail
+ keyword nojail noprefix
}
start()
diff --git a/init.d.BSD/rarpd b/init.d.BSD/rarpd.in
index 837e020..837e020 100644
--- a/init.d.BSD/rarpd
+++ b/init.d.BSD/rarpd.in
diff --git a/init.d.BSD/rc-enabled b/init.d.BSD/rc-enabled.in
index f30dd28..77366f2 100644
--- a/init.d.BSD/rc-enabled
+++ b/init.d.BSD/rc-enabled.in
@@ -7,6 +7,7 @@ depend()
need localmount net
after *
before local
+ keyword noprefix
}
start()
diff --git a/init.d.BSD/rpcbind b/init.d.BSD/rpcbind.in
index 1ac3873..1ac3873 100644
--- a/init.d.BSD/rpcbind
+++ b/init.d.BSD/rpcbind.in
diff --git a/init.d.BSD/savecore b/init.d.BSD/savecore.in
index 6784a1d..f37e0d2 100755..100644
--- a/init.d.BSD/savecore
+++ b/init.d.BSD/savecore.in
@@ -7,7 +7,7 @@ description="Saves a kernel dump."
depend()
{
need localmount
- keyword nojail
+ keyword nojail noprefix
}
start()
diff --git a/init.d.BSD/swap-blk b/init.d.BSD/swap-blk.in
index a308f5e..a38bae9 100644
--- a/init.d.BSD/swap-blk
+++ b/init.d.BSD/swap-blk.in
@@ -5,7 +5,7 @@
depend()
{
before fsck
- keyword nojail
+ keyword nojail noprefix
}
start()
diff --git a/init.d.BSD/sysctl b/init.d.BSD/sysctl.in
index f963571..1de4c93 100644
--- a/init.d.BSD/sysctl
+++ b/init.d.BSD/sysctl.in
@@ -6,6 +6,7 @@ depend()
{
use hostname
before bootmisc logger
+ keyword noprefix
}
start()
diff --git a/init.d.BSD/syslogd b/init.d.BSD/syslogd.in
index e90ba1a..e90ba1a 100644
--- a/init.d.BSD/syslogd
+++ b/init.d.BSD/syslogd.in
diff --git a/init.d.FreeBSD/clock b/init.d.FreeBSD/clock.in
index 7fcb025..3a2c050 100644
--- a/init.d.FreeBSD/clock
+++ b/init.d.FreeBSD/clock.in
@@ -21,7 +21,7 @@ depend()
[ "${clock}" != "UTC" -a ! -e /etc/wall_cmos_clock ]; then
need root
fi
- keyword nojail
+ keyword nojail noprefix
}
start()
diff --git a/init.d.FreeBSD/devd b/init.d.FreeBSD/devd.in
index 04ed3af..3c31284 100644
--- a/init.d.FreeBSD/devd
+++ b/init.d.FreeBSD/devd.in
@@ -10,7 +10,7 @@ depend() {
need localmount
after bootmisc
before net.lo0
- keyword nojail
+ keyword nojail noprefix
}
start_pre() {
diff --git a/init.d.FreeBSD/dumpon b/init.d.FreeBSD/dumpon.in
index b69e4ff..c34c76c 100644
--- a/init.d.FreeBSD/dumpon
+++ b/init.d.FreeBSD/dumpon.in
@@ -6,7 +6,7 @@ description="Configures a specific kernel dump device."
depend() {
need swap
- keyword nojail
+ keyword nojail noprefix
}
start() {
diff --git a/init.d.FreeBSD/ipfw b/init.d.FreeBSD/ipfw.in
index 200b9ce..200b9ce 100644
--- a/init.d.FreeBSD/ipfw
+++ b/init.d.FreeBSD/ipfw.in
diff --git a/init.d.FreeBSD/mixer b/init.d.FreeBSD/mixer.in
index b8c8f3a..b8c8f3a 100644
--- a/init.d.FreeBSD/mixer
+++ b/init.d.FreeBSD/mixer.in
diff --git a/init.d.FreeBSD/nscd b/init.d.FreeBSD/nscd.in
index e75f5dc..e75f5dc 100644
--- a/init.d.FreeBSD/nscd
+++ b/init.d.FreeBSD/nscd.in
diff --git a/init.d.FreeBSD/powerd b/init.d.FreeBSD/powerd.in
index 106962a..106962a 100644
--- a/init.d.FreeBSD/powerd
+++ b/init.d.FreeBSD/powerd.in
diff --git a/init.d.FreeBSD/syscons b/init.d.FreeBSD/syscons.in
index 45ed5b0..039675b 100644
--- a/init.d.FreeBSD/syscons
+++ b/init.d.FreeBSD/syscons.in
@@ -4,7 +4,7 @@
depend() {
need localmount
- keyword nojail
+ keyword nojail noprefix
}
start() {
diff --git a/init.d.Linux/clock b/init.d.Linux/clock.in
index 691f321..ea7ad2b 100755..100644
--- a/init.d.Linux/clock
+++ b/init.d.Linux/clock.in
@@ -28,7 +28,7 @@ depend()
else
before *
fi
- keyword nouml novps noxenu
+ keyword noprefix nouml novps noxenu
}
setupopts()
diff --git a/init.d.Linux/consolefont b/init.d.Linux/consolefont.in
index 7bf6bfc..37f1fee 100755..100644
--- a/init.d.Linux/consolefont
+++ b/init.d.Linux/consolefont.in
@@ -9,7 +9,7 @@ depend()
need localmount
need keymaps # sets up terminal encoding scheme
after hotplug
- keyword nouml novps noxenu
+ keyword noprefix nouml novps noxenu
}
start()
diff --git a/init.d.Linux/keymaps b/init.d.Linux/keymaps.in
index b09137d..827b550 100755..100644
--- a/init.d.Linux/keymaps
+++ b/init.d.Linux/keymaps.in
@@ -15,7 +15,7 @@ dumpkeys_charset=${dumpkeys_charset:-${DUMPKEYS_CHARSET}}
depend()
{
need localmount
- keyword nouml novps noxenu
+ keyword noprefix nouml novps noxenu
}
start()
diff --git a/init.d.Linux/modules b/init.d.Linux/modules.in
index c3064d1..825ca49 100755..100644
--- a/init.d.Linux/modules
+++ b/init.d.Linux/modules.in
@@ -7,7 +7,7 @@ description="Loads a user defined list of kernel modules."
depend()
{
use isapnp
- keyword novps
+ keyword noprefix novps
}
start()
diff --git a/init.d.Linux/mtab b/init.d.Linux/mtab.in
index abb9492..cd3e1b9 100644
--- a/init.d.Linux/mtab
+++ b/init.d.Linux/mtab.in
@@ -7,6 +7,7 @@ description="Update /etc/mtab to match what the kernel knows about"
depend()
{
need root
+ keyword noprefix
}
start()
diff --git a/init.d.Linux/numlock b/init.d.Linux/numlock.in
index 6327361..5f9d55d 100755..100644
--- a/init.d.Linux/numlock
+++ b/init.d.Linux/numlock.in
@@ -9,6 +9,7 @@ ttyn=${rc_tty_number:-${RC_TTY_NUMBER}:-12}
depend()
{
need localmount
+ keyword noprefix
}
_setleds()
diff --git a/init.d.Linux/procfs b/init.d.Linux/procfs.in
index 9e55d88..4087863 100644
--- a/init.d.Linux/procfs
+++ b/init.d.Linux/procfs.in
@@ -6,7 +6,8 @@ description="Mounts misc filesystems in /proc."
depend()
{
- need localmount
+ need localmount
+ keyword noprefix
}
start()
diff --git a/init.d.Linux/sysctl b/init.d.Linux/sysctl.in
index 0a49040..be0b539 100644
--- a/init.d.Linux/sysctl
+++ b/init.d.Linux/sysctl.in
@@ -6,7 +6,7 @@ depend()
{
use hostname
before bootmisc logger
- keyword novps
+ keyword noprefix novps
}
start()
diff --git a/init.d.NetBSD/ttys b/init.d.NetBSD/ttys.in
index 59b6674..3e07de3 100644
--- a/init.d.NetBSD/ttys
+++ b/init.d.NetBSD/ttys.in
@@ -2,6 +2,12 @@
# Copyright 2008 Roy Marples <roy@marples.name>
# All rights reserved. Released under the 2-clause BSD license.
+depend()
+{
+ after fsck
+ keyword noprefix
+}
+
start()
{
ebegin "Setting tty flags"
diff --git a/init.d.NetBSD/wscons b/init.d.NetBSD/wscons.in
index 7859f5f..6fee03d 100644
--- a/init.d.NetBSD/wscons
+++ b/init.d.NetBSD/wscons.in
@@ -5,6 +5,7 @@
depend()
{
need localmount
+ keyword noprefix
}
start()
diff --git a/init.d/bootmisc b/init.d/bootmisc.in
index a66c93f..a14a2c7 100755..100644
--- a/init.d/bootmisc
+++ b/init.d/bootmisc.in
@@ -8,6 +8,7 @@ depend()
need localmount
before logger
after clock sysctl
+ keyword noprefix
}
cleanup_tmp_dir()
diff --git a/init.d/fsck b/init.d/fsck.in
index fec912b..f34a852 100644
--- a/init.d/fsck
+++ b/init.d/fsck.in
@@ -9,7 +9,7 @@ _ISF="
depend()
{
after clock modules
- keyword nojail notimeout
+ keyword nojail noprefix notimeout
}
_abort() {
diff --git a/init.d/hostname b/init.d/hostname.in
index a777cb3..646ceb8 100755..100644
--- a/init.d/hostname
+++ b/init.d/hostname.in
@@ -4,6 +4,10 @@
description="Sets the hostname of the machine."
+depend() {
+ keyword noprefix
+}
+
start()
{
hostname=${hostname-${HOSTNAME-localhost}}
diff --git a/init.d/local b/init.d/local.in
index 9b83752..9b83752 100755..100644
--- a/init.d/local
+++ b/init.d/local.in
diff --git a/init.d/localmount b/init.d/localmount.in
index a598a71..bc16f70 100755..100644
--- a/init.d/localmount
+++ b/init.d/localmount.in
@@ -8,7 +8,7 @@ depend()
{
need fsck
use modules mtab
- keyword nojail
+ keyword nojail noprefix
}
start()
diff --git a/init.d/netmount b/init.d/netmount.in
index 688b0f4..3aa46e1 100755..100644
--- a/init.d/netmount
+++ b/init.d/netmount.in
@@ -34,7 +34,7 @@ depend()
config /etc/fstab
need net ${pmap}
use afc-client amd autofs dns nfs nfsmount portmap rpcbind rpc.statd
- keyword nojail
+ keyword nojail noprefix
}
start()
diff --git a/init.d/root b/init.d/root.in
index ff4726b..b7ffbf8 100644
--- a/init.d/root
+++ b/init.d/root.in
@@ -7,7 +7,7 @@ description="Mount the root fs read/write"
depend()
{
need fsck
- keyword nojail
+ keyword nojail noprefix
}
start()
diff --git a/init.d/swap b/init.d/swap.in
index c8b1ab8..b9f4fc9 100644
--- a/init.d/swap
+++ b/init.d/swap.in
@@ -5,7 +5,7 @@
depend()
{
need localmount
- keyword nojail
+ keyword nojail noprefix
}
start()
diff --git a/init.d/urandom b/init.d/urandom.in
index 3fc0a6d..6e90100 100755..100644
--- a/init.d/urandom
+++ b/init.d/urandom.in
@@ -9,7 +9,7 @@ description="Initializes the random number generator."
depend()
{
need localmount
- keyword nojail
+ keyword nojail noprefix
}
save_seed()
diff --git a/src/rc/rc.c b/src/rc/rc.c
index 102461d..dbe975d 100644
--- a/src/rc/rc.c
+++ b/src/rc/rc.c
@@ -760,10 +760,12 @@ int main (int argc, char **argv)
newlevel = argv[optind++];
+#ifndef PREFIX
/* OK, so we really are the main RC process
* Only root should be able to run us */
if (geteuid () != 0)
eerrorx ("%s: root access required", applet);
+#endif
/* Enable logging */
setenv ("EINFO_LOG", "rc", 1);
diff --git a/src/rc/runscript.c b/src/rc/runscript.c
index 33f814d..b0982f6 100644
--- a/src/rc/runscript.c
+++ b/src/rc/runscript.c
@@ -1271,8 +1271,10 @@ int runscript (int argc, char **argv)
if (retval & RC_SERVICE_STARTED)
retval = 0;
} else {
+#ifndef PREFIX
if (geteuid () != 0)
eerrorx ("%s: root access required", applet);
+#endif
if (strcmp (optarg, "conditionalrestart") == 0 ||
strcmp (optarg, "condrestart") == 0)