Don't check for root in prefix.
This commit is contained in:
		| @@ -9,7 +9,7 @@ depend() | |||||||
| { | { | ||||||
| 	need root | 	need root | ||||||
| 	before devd net | 	before devd net | ||||||
| 	keyword nojail | 	keyword nojail noprefix | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| _set() | _set() | ||||||
| @@ -16,7 +16,7 @@ depend() | |||||||
| { | { | ||||||
| 	need localmount | 	need localmount | ||||||
| 	after bootmisc | 	after bootmisc | ||||||
| 	keyword nojail | 	keyword nojail noprefix | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| start() | start() | ||||||
| @@ -11,7 +11,7 @@ extra_started_commands="reload" | |||||||
| 
 | 
 | ||||||
| depend() { | depend() { | ||||||
| 	need localmount | 	need localmount | ||||||
| 	keyword nojail | 	keyword nojail noprefix | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| start() | start() | ||||||
| @@ -7,6 +7,7 @@ depend() | |||||||
| 	need localmount net | 	need localmount net | ||||||
| 	after * | 	after * | ||||||
| 	before local | 	before local | ||||||
|  | 	keyword noprefix | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| start() | start() | ||||||
							
								
								
									
										2
									
								
								init.d.BSD/savecore → init.d.BSD/savecore.in
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							
							
						
						
									
										2
									
								
								init.d.BSD/savecore → init.d.BSD/savecore.in
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							| @@ -7,7 +7,7 @@ description="Saves a kernel dump." | |||||||
| depend() | depend() | ||||||
| { | { | ||||||
| 	need localmount | 	need localmount | ||||||
| 	keyword nojail | 	keyword nojail noprefix | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| start() | start() | ||||||
| @@ -5,7 +5,7 @@ | |||||||
| depend() | depend() | ||||||
| { | { | ||||||
| 	before fsck | 	before fsck | ||||||
| 	keyword nojail | 	keyword nojail noprefix | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| start() | start() | ||||||
| @@ -6,6 +6,7 @@ depend() | |||||||
| { | { | ||||||
| 	use hostname | 	use hostname | ||||||
| 	before bootmisc logger | 	before bootmisc logger | ||||||
|  | 	keyword noprefix | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| start() | start() | ||||||
| @@ -21,7 +21,7 @@ depend() | |||||||
| 	   [ "${clock}" != "UTC" -a ! -e /etc/wall_cmos_clock ]; then | 	   [ "${clock}" != "UTC" -a ! -e /etc/wall_cmos_clock ]; then | ||||||
| 		need root | 		need root | ||||||
| 	fi | 	fi | ||||||
| 	keyword nojail | 	keyword nojail noprefix | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| start() | start() | ||||||
| @@ -10,7 +10,7 @@ depend() { | |||||||
| 	need localmount | 	need localmount | ||||||
| 	after bootmisc | 	after bootmisc | ||||||
| 	before net.lo0 | 	before net.lo0 | ||||||
| 	keyword nojail | 	keyword nojail noprefix | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| start_pre() { | start_pre() { | ||||||
| @@ -6,7 +6,7 @@ description="Configures a specific kernel dump device." | |||||||
| 
 | 
 | ||||||
| depend() { | depend() { | ||||||
| 	need swap | 	need swap | ||||||
| 	keyword nojail | 	keyword nojail noprefix | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| start() { | start() { | ||||||
| @@ -4,7 +4,7 @@ | |||||||
| 
 | 
 | ||||||
| depend() { | depend() { | ||||||
| 	need localmount | 	need localmount | ||||||
| 	keyword nojail | 	keyword nojail noprefix | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| start() { | start() { | ||||||
							
								
								
									
										2
									
								
								init.d.Linux/clock → init.d.Linux/clock.in
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							
							
						
						
									
										2
									
								
								init.d.Linux/clock → init.d.Linux/clock.in
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							| @@ -28,7 +28,7 @@ depend() | |||||||
| 	else | 	else | ||||||
| 		before * | 		before * | ||||||
| 	fi | 	fi | ||||||
| 	keyword nouml novps noxenu | 	keyword noprefix nouml novps noxenu | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| setupopts() | setupopts() | ||||||
							
								
								
									
										2
									
								
								init.d.Linux/consolefont → init.d.Linux/consolefont.in
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							
							
						
						
									
										2
									
								
								init.d.Linux/consolefont → init.d.Linux/consolefont.in
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							| @@ -9,7 +9,7 @@ depend() | |||||||
| 	need localmount | 	need localmount | ||||||
| 	need keymaps    # sets up terminal encoding scheme | 	need keymaps    # sets up terminal encoding scheme | ||||||
| 	after hotplug | 	after hotplug | ||||||
| 	keyword nouml novps noxenu | 	keyword noprefix nouml novps noxenu | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| start() | start() | ||||||
							
								
								
									
										2
									
								
								init.d.Linux/keymaps → init.d.Linux/keymaps.in
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							
							
						
						
									
										2
									
								
								init.d.Linux/keymaps → init.d.Linux/keymaps.in
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							| @@ -15,7 +15,7 @@ dumpkeys_charset=${dumpkeys_charset:-${DUMPKEYS_CHARSET}} | |||||||
| depend() | depend() | ||||||
| { | { | ||||||
| 	need localmount | 	need localmount | ||||||
| 	keyword nouml novps noxenu | 	keyword noprefix nouml novps noxenu | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| start() | start() | ||||||
							
								
								
									
										2
									
								
								init.d.Linux/modules → init.d.Linux/modules.in
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							
							
						
						
									
										2
									
								
								init.d.Linux/modules → init.d.Linux/modules.in
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							| @@ -7,7 +7,7 @@ description="Loads a user defined list of kernel modules." | |||||||
| depend() | depend() | ||||||
| { | { | ||||||
| 	use isapnp | 	use isapnp | ||||||
| 	keyword novps | 	keyword noprefix novps | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| start() | start() | ||||||
| @@ -7,6 +7,7 @@ description="Update /etc/mtab to match what the kernel knows about" | |||||||
| depend() | depend() | ||||||
| { | { | ||||||
| 	need root | 	need root | ||||||
|  | 	keyword noprefix | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| start() | start() | ||||||
							
								
								
									
										1
									
								
								init.d.Linux/numlock → init.d.Linux/numlock.in
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							
							
						
						
									
										1
									
								
								init.d.Linux/numlock → init.d.Linux/numlock.in
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							| @@ -9,6 +9,7 @@ ttyn=${rc_tty_number:-${RC_TTY_NUMBER}:-12} | |||||||
| depend() | depend() | ||||||
| { | { | ||||||
| 	need localmount | 	need localmount | ||||||
|  | 	keyword noprefix | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| _setleds() | _setleds() | ||||||
| @@ -6,7 +6,8 @@ description="Mounts misc filesystems in /proc." | |||||||
| 
 | 
 | ||||||
| depend() | depend() | ||||||
| { | { | ||||||
| 	need localmount  | 	need localmount | ||||||
|  | 	keyword noprefix | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| start() | start() | ||||||
| @@ -6,7 +6,7 @@ depend() | |||||||
| { | { | ||||||
| 	use hostname | 	use hostname | ||||||
| 	before bootmisc logger | 	before bootmisc logger | ||||||
| 	keyword novps | 	keyword noprefix novps | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| start() | start() | ||||||
| @@ -2,6 +2,12 @@ | |||||||
| # Copyright 2008 Roy Marples <roy@marples.name> | # Copyright 2008 Roy Marples <roy@marples.name> | ||||||
| # All rights reserved. Released under the 2-clause BSD license. | # All rights reserved. Released under the 2-clause BSD license. | ||||||
| 
 | 
 | ||||||
|  | depend()  | ||||||
|  | { | ||||||
|  | 	after fsck | ||||||
|  | 	keyword noprefix | ||||||
|  | } | ||||||
|  | 
 | ||||||
| start() | start() | ||||||
| { | { | ||||||
| 	ebegin "Setting tty flags" | 	ebegin "Setting tty flags" | ||||||
| @@ -5,6 +5,7 @@ | |||||||
| depend() | depend() | ||||||
| { | { | ||||||
| 	need localmount | 	need localmount | ||||||
|  | 	keyword noprefix | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| start() | start() | ||||||
							
								
								
									
										1
									
								
								init.d/bootmisc → init.d/bootmisc.in
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							
							
						
						
									
										1
									
								
								init.d/bootmisc → init.d/bootmisc.in
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							| @@ -8,6 +8,7 @@ depend() | |||||||
| 	need localmount | 	need localmount | ||||||
| 	before logger | 	before logger | ||||||
| 	after clock sysctl | 	after clock sysctl | ||||||
|  | 	keyword noprefix | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| cleanup_tmp_dir() | cleanup_tmp_dir() | ||||||
| @@ -9,7 +9,7 @@ _ISF=" | |||||||
| depend() | depend() | ||||||
| { | { | ||||||
| 	after clock modules | 	after clock modules | ||||||
| 	keyword nojail notimeout | 	keyword nojail noprefix notimeout | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| _abort() { | _abort() { | ||||||
							
								
								
									
										4
									
								
								init.d/hostname → init.d/hostname.in
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							
							
						
						
									
										4
									
								
								init.d/hostname → init.d/hostname.in
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							| @@ -4,6 +4,10 @@ | |||||||
| 
 | 
 | ||||||
| description="Sets the hostname of the machine." | description="Sets the hostname of the machine." | ||||||
| 
 | 
 | ||||||
|  | depend() { | ||||||
|  | 	keyword noprefix | ||||||
|  | } | ||||||
|  | 
 | ||||||
| start() | start() | ||||||
| { | { | ||||||
| 	hostname=${hostname-${HOSTNAME-localhost}} | 	hostname=${hostname-${HOSTNAME-localhost}} | ||||||
							
								
								
									
										0
									
								
								init.d/local → init.d/local.in
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							
							
						
						
									
										0
									
								
								init.d/local → init.d/local.in
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							
							
								
								
									
										2
									
								
								init.d/localmount → init.d/localmount.in
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							
							
						
						
									
										2
									
								
								init.d/localmount → init.d/localmount.in
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							| @@ -8,7 +8,7 @@ depend() | |||||||
| { | { | ||||||
| 	need fsck | 	need fsck | ||||||
| 	use modules mtab | 	use modules mtab | ||||||
| 	keyword nojail | 	keyword nojail noprefix | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| start() | start() | ||||||
							
								
								
									
										2
									
								
								init.d/netmount → init.d/netmount.in
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							
							
						
						
									
										2
									
								
								init.d/netmount → init.d/netmount.in
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							| @@ -34,7 +34,7 @@ depend() | |||||||
| 	config /etc/fstab | 	config /etc/fstab | ||||||
| 	need net ${pmap} | 	need net ${pmap} | ||||||
| 	use afc-client amd autofs dns nfs nfsmount portmap rpcbind rpc.statd | 	use afc-client amd autofs dns nfs nfsmount portmap rpcbind rpc.statd | ||||||
| 	keyword nojail | 	keyword nojail noprefix | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| start() | start() | ||||||
| @@ -7,7 +7,7 @@ description="Mount the root fs read/write" | |||||||
| depend() | depend() | ||||||
| { | { | ||||||
| 	need fsck | 	need fsck | ||||||
| 	keyword nojail | 	keyword nojail noprefix | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| start() | start() | ||||||
| @@ -5,7 +5,7 @@ | |||||||
| depend() | depend() | ||||||
| { | { | ||||||
| 	need localmount | 	need localmount | ||||||
| 	keyword nojail | 	keyword nojail noprefix | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| start() | start() | ||||||
							
								
								
									
										2
									
								
								init.d/urandom → init.d/urandom.in
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							
							
						
						
									
										2
									
								
								init.d/urandom → init.d/urandom.in
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							| @@ -9,7 +9,7 @@ description="Initializes the random number generator." | |||||||
| depend() | depend() | ||||||
| { | { | ||||||
| 	need localmount | 	need localmount | ||||||
| 	keyword nojail | 	keyword nojail noprefix | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| save_seed() | save_seed() | ||||||
| @@ -760,10 +760,12 @@ int main (int argc, char **argv) | |||||||
|  |  | ||||||
| 	newlevel = argv[optind++]; | 	newlevel = argv[optind++]; | ||||||
|  |  | ||||||
|  | #ifndef PREFIX | ||||||
| 	/* OK, so we really are the main RC process | 	/* OK, so we really are the main RC process | ||||||
| 	 * Only root should be able to run us */ | 	 * Only root should be able to run us */ | ||||||
| 	if (geteuid () != 0) | 	if (geteuid () != 0) | ||||||
| 		eerrorx ("%s: root access required", applet); | 		eerrorx ("%s: root access required", applet); | ||||||
|  | #endif | ||||||
|  |  | ||||||
| 	/* Enable logging */ | 	/* Enable logging */ | ||||||
| 	setenv ("EINFO_LOG", "rc", 1); | 	setenv ("EINFO_LOG", "rc", 1); | ||||||
|   | |||||||
| @@ -1271,8 +1271,10 @@ int runscript (int argc, char **argv) | |||||||
| 			if (retval & RC_SERVICE_STARTED) | 			if (retval & RC_SERVICE_STARTED) | ||||||
| 				retval = 0; | 				retval = 0; | ||||||
| 		} else { | 		} else { | ||||||
|  | #ifndef PREFIX | ||||||
| 			if (geteuid () != 0) | 			if (geteuid () != 0) | ||||||
| 				eerrorx ("%s: root access required", applet); | 				eerrorx ("%s: root access required", applet); | ||||||
|  | #endif | ||||||
|  |  | ||||||
| 			if (strcmp (optarg, "conditionalrestart") == 0 || | 			if (strcmp (optarg, "conditionalrestart") == 0 || | ||||||
| 			    strcmp (optarg, "condrestart") == 0) | 			    strcmp (optarg, "condrestart") == 0) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user