Don't check for root in prefix.
This commit is contained in:
		| @@ -9,7 +9,7 @@ depend() | ||||
| { | ||||
| 	need root | ||||
| 	before devd net | ||||
| 	keyword nojail | ||||
| 	keyword nojail noprefix | ||||
| } | ||||
| 
 | ||||
| _set() | ||||
| @@ -16,7 +16,7 @@ depend() | ||||
| { | ||||
| 	need localmount | ||||
| 	after bootmisc | ||||
| 	keyword nojail | ||||
| 	keyword nojail noprefix | ||||
| } | ||||
| 
 | ||||
| start() | ||||
| @@ -11,7 +11,7 @@ extra_started_commands="reload" | ||||
| 
 | ||||
| depend() { | ||||
| 	need localmount | ||||
| 	keyword nojail | ||||
| 	keyword nojail noprefix | ||||
| } | ||||
| 
 | ||||
| start() | ||||
| @@ -7,6 +7,7 @@ depend() | ||||
| 	need localmount net | ||||
| 	after * | ||||
| 	before local | ||||
| 	keyword noprefix | ||||
| } | ||||
| 
 | ||||
| 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() | ||||
| { | ||||
| 	need localmount | ||||
| 	keyword nojail | ||||
| 	keyword nojail noprefix | ||||
| } | ||||
| 
 | ||||
| start() | ||||
| @@ -5,7 +5,7 @@ | ||||
| depend() | ||||
| { | ||||
| 	before fsck | ||||
| 	keyword nojail | ||||
| 	keyword nojail noprefix | ||||
| } | ||||
| 
 | ||||
| start() | ||||
| @@ -6,6 +6,7 @@ depend() | ||||
| { | ||||
| 	use hostname | ||||
| 	before bootmisc logger | ||||
| 	keyword noprefix | ||||
| } | ||||
| 
 | ||||
| start() | ||||
| @@ -21,7 +21,7 @@ depend() | ||||
| 	   [ "${clock}" != "UTC" -a ! -e /etc/wall_cmos_clock ]; then | ||||
| 		need root | ||||
| 	fi | ||||
| 	keyword nojail | ||||
| 	keyword nojail noprefix | ||||
| } | ||||
| 
 | ||||
| start() | ||||
| @@ -10,7 +10,7 @@ depend() { | ||||
| 	need localmount | ||||
| 	after bootmisc | ||||
| 	before net.lo0 | ||||
| 	keyword nojail | ||||
| 	keyword nojail noprefix | ||||
| } | ||||
| 
 | ||||
| start_pre() { | ||||
| @@ -6,7 +6,7 @@ description="Configures a specific kernel dump device." | ||||
| 
 | ||||
| depend() { | ||||
| 	need swap | ||||
| 	keyword nojail | ||||
| 	keyword nojail noprefix | ||||
| } | ||||
| 
 | ||||
| start() { | ||||
| @@ -4,7 +4,7 @@ | ||||
| 
 | ||||
| depend() { | ||||
| 	need localmount | ||||
| 	keyword nojail | ||||
| 	keyword nojail noprefix | ||||
| } | ||||
| 
 | ||||
| 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 | ||||
| 		before * | ||||
| 	fi | ||||
| 	keyword nouml novps noxenu | ||||
| 	keyword noprefix nouml novps noxenu | ||||
| } | ||||
| 
 | ||||
| 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 keymaps    # sets up terminal encoding scheme | ||||
| 	after hotplug | ||||
| 	keyword nouml novps noxenu | ||||
| 	keyword noprefix nouml novps noxenu | ||||
| } | ||||
| 
 | ||||
| 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() | ||||
| { | ||||
| 	need localmount | ||||
| 	keyword nouml novps noxenu | ||||
| 	keyword noprefix nouml novps noxenu | ||||
| } | ||||
| 
 | ||||
| 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() | ||||
| { | ||||
| 	use isapnp | ||||
| 	keyword novps | ||||
| 	keyword noprefix novps | ||||
| } | ||||
| 
 | ||||
| start() | ||||
| @@ -7,6 +7,7 @@ description="Update /etc/mtab to match what the kernel knows about" | ||||
| depend() | ||||
| { | ||||
| 	need root | ||||
| 	keyword noprefix | ||||
| } | ||||
| 
 | ||||
| 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() | ||||
| { | ||||
| 	need localmount | ||||
| 	keyword noprefix | ||||
| } | ||||
| 
 | ||||
| _setleds() | ||||
| @@ -7,6 +7,7 @@ description="Mounts misc filesystems in /proc." | ||||
| depend() | ||||
| { | ||||
| 	need localmount | ||||
| 	keyword noprefix | ||||
| } | ||||
| 
 | ||||
| start() | ||||
| @@ -6,7 +6,7 @@ depend() | ||||
| { | ||||
| 	use hostname | ||||
| 	before bootmisc logger | ||||
| 	keyword novps | ||||
| 	keyword noprefix novps | ||||
| } | ||||
| 
 | ||||
| start() | ||||
| @@ -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" | ||||
| @@ -5,6 +5,7 @@ | ||||
| depend() | ||||
| { | ||||
| 	need localmount | ||||
| 	keyword noprefix | ||||
| } | ||||
| 
 | ||||
| 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 | ||||
| 	before logger | ||||
| 	after clock sysctl | ||||
| 	keyword noprefix | ||||
| } | ||||
| 
 | ||||
| cleanup_tmp_dir() | ||||
| @@ -9,7 +9,7 @@ _ISF=" | ||||
| depend() | ||||
| { | ||||
| 	after clock modules | ||||
| 	keyword nojail notimeout | ||||
| 	keyword nojail noprefix notimeout | ||||
| } | ||||
| 
 | ||||
| _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." | ||||
| 
 | ||||
| depend() { | ||||
| 	keyword noprefix | ||||
| } | ||||
| 
 | ||||
| start() | ||||
| { | ||||
| 	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 | ||||
| 	use modules mtab | ||||
| 	keyword nojail | ||||
| 	keyword nojail noprefix | ||||
| } | ||||
| 
 | ||||
| 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 | ||||
| 	need net ${pmap} | ||||
| 	use afc-client amd autofs dns nfs nfsmount portmap rpcbind rpc.statd | ||||
| 	keyword nojail | ||||
| 	keyword nojail noprefix | ||||
| } | ||||
| 
 | ||||
| start() | ||||
| @@ -7,7 +7,7 @@ description="Mount the root fs read/write" | ||||
| depend() | ||||
| { | ||||
| 	need fsck | ||||
| 	keyword nojail | ||||
| 	keyword nojail noprefix | ||||
| } | ||||
| 
 | ||||
| start() | ||||
| @@ -5,7 +5,7 @@ | ||||
| depend() | ||||
| { | ||||
| 	need localmount | ||||
| 	keyword nojail | ||||
| 	keyword nojail noprefix | ||||
| } | ||||
| 
 | ||||
| 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() | ||||
| { | ||||
| 	need localmount | ||||
| 	keyword nojail | ||||
| 	keyword nojail noprefix | ||||
| } | ||||
| 
 | ||||
| save_seed() | ||||
| @@ -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); | ||||
|   | ||||
| @@ -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) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user