Skip to content
This repository was archived by the owner on Jan 12, 2022. It is now read-only.

Commit 5fe03d2

Browse files
committed
Fix shellcheck errors
1 parent ecea819 commit 5fe03d2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

systemd/postinst.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,23 @@ systemctl enable moodle-docker >/dev/null || true
2222
#systemctl start moodle-docker >/dev/null || true
2323
}
2424

25-
if [ "${1}" = "configure" -a -z "${2}" ] || \
25+
if [ "${1}" = "configure" ] && [ -z "${2}" ] || \
2626
[ "${1}" = "abort-remove" ]
2727
then
2828
# "after install" here
2929
# "abort-remove" happens when the pre-removal script failed.
3030
# In that case, this script, which should be idemptoent, is run
3131
# to ensure a clean roll-back of the removal.
3232
after_install
33-
elif [ "${1}" = "configure" -a -n "${2}" ]
33+
elif [ "${1}" = "configure" ] && [ -n "${2}" ]
3434
then
3535
upgradeFromVersion="${2}"
3636
# "after upgrade" here
3737
# NOTE: This slot is also used when deb packages are removed,
3838
# but their config files aren't, but a newer version of the
3939
# package is installed later, called "Config-Files" state.
4040
# basically, that still looks a _lot_ like an upgrade to me.
41-
after_upgrade "${2}"
41+
after_upgrade "${upgradeFromVersion}"
4242
elif echo "${1}" | grep -E -q "(abort|fail)"
4343
then
4444
echo "Failed to install before the post-installation script was run." >&2

systemd/prerm.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dummy() {
1111
:
1212
}
1313

14-
if [ "${1}" = "remove" -a -z "${2}" ]
14+
if [ "${1}" = "remove" ] && [ -z "${2}" ]
1515
then
1616
# "before remove" goes here
1717
before_remove

0 commit comments

Comments
 (0)