projects
/
live-boot-grml.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Adding noapparmor boot parameter.
[live-boot-grml.git]
/
scripts
/
live-bottom
/
42disable_cups_apparmor
diff --git
a/scripts/live-bottom/42disable_cups_apparmor
b/scripts/live-bottom/42disable_cups_apparmor
old mode 100644
(file)
new mode 100755
(executable)
index
4a53444
..
09d1869
--- a/
scripts/live-bottom/42disable_cups_apparmor
+++ b/
scripts/live-bottom/42disable_cups_apparmor
@@
-1,29
+1,43
@@
#!/bin/sh
#!/bin/sh
-# workaround for AppArmor bug #131976
-PREREQ=""
-DESCRIPTION="Disabling AppArmor profile for Cups..."
+#set -e
+
+# initramfs-tools header
-. /scripts/casper-functions
+PREREQ=""
prereqs()
{
prereqs()
{
- echo "$
PREREQ
"
+ echo "$
{PREREQ}
"
}
}
-case $1 in
-# get pre-requisites
-prereqs)
- prereqs
- exit 0
- ;;
+case "${1}" in
+ prereqs)
+ prereqs
+ exit 0
+ ;;
esac
esac
-log_begin_msg "$DESCRIPTION"
+# live-initramfs header
+
+if [ -n "${NOAPPARMOR}" ]
+then
+ exit 0
+fi
+
+. /scripts/live-functions
+
+log_begin_msg "Disabling AppArmor profile for Cups..."
+
+# live-initramfs script
+
+# workaround for AppArmor bug #131976
PROFILE=/root/etc/apparmor.d/usr.sbin.cupsd
PROFILE=/root/etc/apparmor.d/usr.sbin.cupsd
-if [ -e "$PROFILE" ]; then
- sed -i '/{/ s/{/flags=(complain) {/' $PROFILE
+
+if [ -e "$PROFILE" ]
+then
+ sed -i '/{/ s/{/flags=(complain) {/' $PROFILE
fi
log_end_msg
fi
log_end_msg