Skip to content

Commit ad240b8

Browse files
authored
Apparmor small fix for LXC
2 parents 3ad3182 + 08c3436 commit ad240b8

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

install/hst-install-ubuntu.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1222,10 +1222,12 @@ if [ "$named" = 'yes' ]; then
12221222
chmod 640 /etc/bind/named.conf.options
12231223
aa-complain /usr/sbin/named > /dev/null 2>&1
12241224
echo "/home/** rwm," >> /etc/apparmor.d/local/usr.sbin.named > /dev/null 2>&1
1225-
service apparmor status > /dev/null 2>&1
1226-
if [ $? -ne 0 ]; then
1227-
service apparmor restart
1228-
fi
1225+
if ! grep --quiet lxc /proc/1/environ; then
1226+
service apparmor status > /dev/null 2>&1
1227+
if [ $? -ne 0 ]; then
1228+
service apparmor restart
1229+
fi
1230+
fi
12291231
update-rc.d bind9 defaults
12301232
service bind9 start
12311233
check_result $? "bind9 start failed"

0 commit comments

Comments
 (0)