[apparmor] [patch] initscript changes (apparmor-scripts)
Steve Beattie
steve at nxnw.org
Tue Aug 9 09:33:55 UTC 2011
On Mon, Aug 08, 2011 at 11:53:16PM +0200, Christian Boltz wrote:
> Hello,
>
> the next openSUSE patch includes some changes in the initscripts.
Acked-By: Steve Beattie <sbeattie at ubuntu.com>
Thanks!
> ---
>
> parser/rc.aaeventd.suse | 2 +-
> parser/rc.apparmor.functions | 9 ++++-----
> parser/rc.apparmor.suse | 23 ++++++++++++++++++++++-
> 3 files changed, 27 insertions(+), 7 deletions(-)
>
> --- a/parser/rc.aaeventd.suse
> +++ b/parser/rc.aaeventd.suse
> @@ -27,7 +27,7 @@
> ### BEGIN INIT INFO
> # Provides: aaeventd
> # Required-Start: apparmor
> -# Required-Stop:
> +# Required-Stop: $null
> # Default-Start: 2 3 5
> # Default-Stop:
> # Short-Description: AppArmor Notification and Reporting
> --- a/parser/rc.apparmor.functions
> +++ b/parser/rc.apparmor.functions
> @@ -108,9 +108,7 @@ is_apparmor_present() {
> # check for subdomainfs version of module
> grep -qE "^($modules)[[:space:]]" /proc/modules
>
> - if [ $? -ne 0 ] ; then
> - ls /sys/module/apparmor 2>/dev/null | grep -qE "^($modules)"
> - fi
> + [ $? -ne 0 -a -d /sys/module/apparmor ]
>
> return $?
> }
> @@ -377,10 +375,11 @@ apparmor_start() {
> configure_owlsm
>
> # if there is anything in the profiles file don't load
> - cat "$SFS_MOUNTPOINT/profiles" | if ! read line ; then
> + if ! read line < "$SFS_MOUNTPOINT/profiles"; then
> parse_profiles load
> else
> - aa_log_skipped_msg "AppArmor already loaded with profiles."
> + aa_log_skipped_msg ": already loaded with profiles."
> + return 0
> fi
> aa_log_end_msg 0
> return 0
> --- a/parser/rc.apparmor.suse
> +++ b/parser/rc.apparmor.suse
> @@ -31,6 +31,7 @@
> # Required-Start: boot.cleanup
> # Required-Stop: $null
> # Should-Start: $local_fs
> +# Should-Stop: $null
> # Default-Start: B
> # Default-Stop:
> # Short-Description: AppArmor initialization
> @@ -73,7 +74,19 @@ aa_log_warning_msg() {
> }
>
> aa_log_failure_msg() {
> - log_failure_msg $*
> + log_failure_msg '\n'$*
> +}
> +
> +aa_log_action_begin() {
> + echo -n
> +}
> +
> +aa_log_action_end() {
> + echo -n
> +}
> +
> +aa_log_daemon_msg() {
> + echo -en "$@ "
> }
>
> aa_log_skipped_msg() {
> @@ -81,6 +94,14 @@ aa_log_skipped_msg() {
> echo -e "$rc_skipped"
> }
>
> +aa_log_end_msg() {
> + v="-v"
> + if [ "$1" != '0' ]; then
> + rc="-v$1"
> + fi
> + rc_status $v
> +}
> +
> usage() {
> echo "Usage: $0 {start|stop|restart|try-restart|reload|force-reload|status|kill}"
> }
> --
> AppArmor mailing list
> AppArmor at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor
--
Steve Beattie
<sbeattie at ubuntu.com>
http://NxNW.org/~steve/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20110809/a93d9767/attachment-0001.pgp>
More information about the AppArmor
mailing list