]> git.pld-linux.org Git - packages/apparmor-parser.git/blame - apparmor-parser.init
- BR: libstdc++-devel
[packages/apparmor-parser.git] / apparmor-parser.init
CommitLineData
5669b081 1#!/bin/bash
8a7820e6
AM
2# chkconfig: 2345 01 99
3# description: AppArmor rc file. This rc script inserts the apparmor \
4# module and runs the parser on the /etc/apparmor.d/ \
5# directory.
6#
7
8# Source function library
9. /etc/rc.d/init.d/functions
10
675f1211 11aa_log_skipped_msg() {
5669b081
AM
12 busy
13 fail
14 [ -n "$*" ] && echo "$*"
8a7820e6 15}
675f1211 16aa_log_success_msg() {
5669b081
AM
17 busy
18 ok
19 [ -n "$*" ] && echo "$*"
8a7820e6
AM
20}
21
675f1211 22aa_log_warning_msg() {
5669b081
AM
23 busy
24 fail
25 [ -n "$*" ] && echo "$*"
8a7820e6
AM
26}
27
675f1211 28aa_log_failure_msg() {
5669b081
AM
29 busy
30 fail
31 [ -n "$*" ] && echo "$*"
8a7820e6
AM
32}
33
675f1211 34aa_action() {
8a7820e6
AM
35 STRING=$1
36 shift
37 run_cmd "$STRING" "$@"
38 return $?
39}
40
d6145c10
AM
41# new in 2.5 (some broken)
42aa_log_action_begin() {
43 :
44}
45
46aa_log_action_end() {
47 :
48}
49
50aa_log_daemon_msg() {
51 :
52}
53
54aa_log_end_msg() {
55 :
56}
57
58log_end_msg() {
59 aa_log_end_msg $*
60}
61
8a7820e6
AM
62. /etc/apparmor/rc.apparmor.functions
63
679e1f68 64RETVAL=0
8a7820e6 65case "$1" in
679e1f68 66start)
5669b081
AM
67 msg_starting apparmor
68 started
675f1211 69 apparmor_start
679e1f68
ER
70 ;;
71stop)
5669b081
AM
72 msg_stopping apparmor
73 started
675f1211 74 apparmor_stop
679e1f68
ER
75 ;;
76restart|reload|force-reload)
5669b081
AM
77 msg_reloading apparmor
78 started
675f1211 79 apparmor_restart
679e1f68
ER
80 ;;
81try-restart)
5669b081
AM
82 msg_reloading
83 started
675f1211 84 apparmor_try_restart
679e1f68
ER
85 ;;
86debug)
675f1211 87 apparmor_debug
679e1f68
ER
88 ;;
89kill)
675f1211 90 apparmor_kill
679e1f68
ER
91 ;;
92status)
675f1211 93 apparmor_status
679e1f68
ER
94 ;;
95*)
96 msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|status|kill}"
97 exit 3
98esac
8a7820e6 99
679e1f68 100exit $RETVAL
This page took 0.066734 seconds and 4 git commands to generate.