This repository was archived by the owner on Jan 12, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -22,23 +22,23 @@ systemctl enable moodle-docker >/dev/null || true
22
22
# systemctl start moodle-docker >/dev/null || true
23
23
}
24
24
25
- if [ " ${1} " = " configure" -a -z " ${2} " ] || \
25
+ if [ " ${1} " = " configure" ] && [ -z " ${2} " ] || \
26
26
[ " ${1} " = " abort-remove" ]
27
27
then
28
28
# "after install" here
29
29
# "abort-remove" happens when the pre-removal script failed.
30
30
# In that case, this script, which should be idemptoent, is run
31
31
# to ensure a clean roll-back of the removal.
32
32
after_install
33
- elif [ " ${1} " = " configure" -a -n " ${2} " ]
33
+ elif [ " ${1} " = " configure" ] && [ -n " ${2} " ]
34
34
then
35
35
upgradeFromVersion=" ${2} "
36
36
# "after upgrade" here
37
37
# NOTE: This slot is also used when deb packages are removed,
38
38
# but their config files aren't, but a newer version of the
39
39
# package is installed later, called "Config-Files" state.
40
40
# basically, that still looks a _lot_ like an upgrade to me.
41
- after_upgrade " ${2 } "
41
+ after_upgrade " ${upgradeFromVersion } "
42
42
elif echo " ${1} " | grep -E -q " (abort|fail)"
43
43
then
44
44
echo " Failed to install before the post-installation script was run." >&2
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ dummy() {
11
11
:
12
12
}
13
13
14
- if [ " ${1} " = " remove" -a -z " ${2} " ]
14
+ if [ " ${1} " = " remove" ] && [ -z " ${2} " ]
15
15
then
16
16
# "before remove" goes here
17
17
before_remove
You can’t perform that action at this time.
0 commit comments