56 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Plaintext
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			56 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Plaintext
		
	
	
		
			Executable File
		
	
	
	
	
| #!/sbin/runscript
 | |
| # Copyright 1999-2006 Gentoo Foundation
 | |
| # Distributed under the terms of the GNU General Public License v2
 | |
| # $Header: $
 | |
| #
 | |
| # rc.apparmor.gentoo: contribuited by Matthew Snelham 
 | |
| # /etc/init.d/apparmor
 | |
| 
 | |
| APPARMOR_FUNCTIONS=/lib/apparmor/rc.apparmor.functions
 | |
| APPARMOR_HELPERS=/lib/apparmor/rc.helper.functions
 | |
| if [ -f "${APPARMOR_HELPERS}" -a -f "${APPARMOR_FUNCTIONS}" ]; then
 | |
|         source ${APPARMOR_HELPERS}
 | |
|         source ${APPARMOR_FUNCTIONS}
 | |
| else
 | |
| 	eend 1 "Unable to find AppArmor initscript functions"
 | |
| fi
 | |
| 
 | |
| opts="${opts} reload status"
 | |
| 
 | |
| depend() {
 | |
| 	need localmount
 | |
| 	## AppArmor needs to be loaded before any other 
 | |
| 	## (potentially protected) user-space services come up.
 | |
| 	#before *
 | |
| }
 | |
| 
 | |
| start() {
 | |
| 	ebegin "Starting AppArmor"
 | |
| 	subdomain_start
 | |
| 	einfo "...AppArmor Start"
 | |
| 	eend $waserror
 | |
| }
 | |
| 
 | |
| stop() {
 | |
| 	ebegin "Stopping AppArmor"
 | |
| 	subdomain_stop
 | |
| 	einfo "...AppArmor Stop"
 | |
| 	eend $waserror
 | |
| }
 | |
| 
 | |
| restart() {
 | |
| 	svc_stop; svc_start
 | |
| }
 | |
| 
 | |
| reload() {
 | |
| 	ebegin "Restarting AppArmor"
 | |
| 	subdomain_restart
 | |
| 	eend $?
 | |
| }
 | |
| 
 | |
| status() {
 | |
| 	ebegin "Checking AppArmor Status"
 | |
| 	subdomain_status
 | |
| 	eend $?
 | |
| }
 |