# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-if ! which apparmor_parser >/dev/null 2>&1; then
+if ! command -v apparmor_parser >/dev/null 2>&1; then
echo 'SKIP: test for generated apparmor profiles: apparmor_parser missing'
fi
exit 0
# Start it
lxc-start -n $CONTAINER_NAME -lDEBUG -o "$LOGFILE"
lxc-wait -n $CONTAINER_NAME -t 5 -s RUNNING || (echo "Container didn't start" && exit 1)
-pid=`lxc-info -p -H -n $CONTAINER_NAME`
-profile=`cat /proc/$pid/attr/current`
+pid=$(lxc-info -p -H -n $CONTAINER_NAME)
+profile=$(cat /proc/$pid/attr/current)
expected_profile="lxc-${CONTAINER_NAME}_</var/lib/lxc>//&:lxc-${CONTAINER_NAME}_<-var-lib-lxc>:unconfined (enforce)"
lxc-stop -n $CONTAINER_NAME -k
if [ "x$profile" != "x$expected_profile" ]; then