2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-30 05:47:59 +00:00

Merge branch 'EmersonBernier/shellcheck' into 'master'

parser/apparmor.systemd: fix minor issues detected by shellcheck

See merge request apparmor/apparmor!293

Acked-by: Christian Boltz <apparmor@cboltz.de> for master and 2.13

(cherry picked from commit a772ee0f8bd569f3db2d89148a5bce3ce1dcd2bd)

b3937d19 parser/apparmor.systemd: fix minor issues detected by shellcheck
This commit is contained in:
Christian Boltz 2019-01-03 17:41:56 +00:00
parent 7a91411704
commit 98a2a107d3

View File

@ -19,7 +19,7 @@ APPARMOR_FUNCTIONS=/lib/apparmor/rc.apparmor.functions
aa_action()
{
echo $1
echo "$1"
shift
"$@"
return $?
@ -27,12 +27,12 @@ aa_action()
aa_log_warning_msg()
{
echo "Warning: $@"
echo "Warning: $*"
}
aa_log_failure_msg()
{
echo "Error: $@"
echo "Error: $*"
}
aa_log_action_start()
@ -42,7 +42,7 @@ aa_log_action_start()
aa_log_action_end()
{
echo -n
printf ""
}
aa_log_daemon_msg()
@ -52,17 +52,18 @@ aa_log_daemon_msg()
aa_log_skipped_msg()
{
echo "Skipped: $@"
echo "Skipped: $*"
}
aa_log_end_msg()
{
echo -n
printf ""
}
# source apparmor function library
if [ -f "${APPARMOR_FUNCTIONS}" ]; then
. ${APPARMOR_FUNCTIONS}
# shellcheck source=rc.apparmor.functions
. "${APPARMOR_FUNCTIONS}"
else
aa_log_failure_msg "Unable to find AppArmor initscript functions"
exit 1
@ -97,4 +98,4 @@ case "$1" in
exit 1
;;
esac
exit $rc
exit "$rc"