aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 3eb4c4fe..7d093a42 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 94c68127..9e8c20f6 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 4f7ade8c..4f7ade8c 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 0b6208e8..daca82a8 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 837e020a..837e020a 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 f30dd280..77366f24 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 1ac38737..1ac38737 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 6784a1d5..f37e0d26 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 a308f5e9..a38bae98 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 f963571b..1de4c930 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 e90ba1a9..e90ba1a9 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 7fcb0256..3a2c050b 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 04ed3af5..3c312845 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 b69e4ffe..c34c76c2 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 200b9cee..200b9cee 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 b8c8f3af..b8c8f3af 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 e75f5dc9..e75f5dc9 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 106962a6..106962a6 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 45ed5b0c..039675b2 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 691f3218..ea7ad2bf 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 7bf6bfc7..37f1feef 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 b09137d5..827b5505 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 c3064d16..825ca493 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 abb94922..cd3e1b98 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 63273612..5f9d55df 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 9e55d885..40878639 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 0a490405..be0b539b 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 59b66743..3e07de3a 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 7859f5fb..6fee03d5 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 a66c93f3..a14a2c7e 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 fec912b1..f34a8522 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 a777cb38..646ceb87 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 9b83752d..9b83752d 100755..100644
--- a/init.d/local
+++ b/init.d/local.in
diff --git a/init.d/localmount b/init.d/localmount.in
index a598a712..bc16f702 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 688b0f4e..3aa46e1a 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 ff4726ba..b7ffbf80 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 c8b1ab8a..b9f4fc9b 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 3fc0a6d0..6e901006 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 102461d5..dbe975de 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 33f814d3..b0982f65 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)