diff --git a/debian/bareos-database-common.config.in b/debian/bareos-database-common.config.in index be5245f71e9..1a8f25e78db 100644 --- a/debian/bareos-database-common.config.in +++ b/debian/bareos-database-common.config.in @@ -30,12 +30,16 @@ if [ -r @scriptdir@/bareos-config-lib.sh ]; then dbc_dbtypes=`echo ${dbc_dbtypes} | sed 's/, *$//'` # action - param1="$1" - shift || true + if [ $# -gt 0 ]; then + param1="$1" + shift + fi # $2: when action is "configure": most-recently-configured-version - param2="$1" - param2_orig=$param2 - shift || true + if [ $# -gt 0 ]; then + param2="$1" + param2_orig=$param2 + shift + fi # When upgrading from an older version (param2), # do not pass the version number of the old package. diff --git a/debian/bareos-database-common.postinst.in b/debian/bareos-database-common.postinst.in index cd34d35b90b..7201c54f9fc 100644 --- a/debian/bareos-database-common.postinst.in +++ b/debian/bareos-database-common.postinst.in @@ -25,11 +25,15 @@ if [ -r @scriptdir@/bareos-config-lib.sh ]; then . /usr/share/dbconfig-common/dpkg/postinst # action - param1="$1" - shift || true + if [ $# -gt 0 ]; then + param1="$1" + shift + fi # when action is "configure": most-recently-configured-version - param2="$1" - shift || true + if [ $# -gt 0 ]; then + param2="$1" + shift + fi if [ "$param2" ]; then case "$param1" in configure|reconfigure) diff --git a/platforms/systemd/bareos-dir.service.in b/platforms/systemd/bareos-dir.service.in index 70e7f495320..960643ed014 100644 --- a/platforms/systemd/bareos-dir.service.in +++ b/platforms/systemd/bareos-dir.service.in @@ -15,7 +15,7 @@ Description=Bareos Director Daemon service Documentation=man:bareos-dir(8) Requires=nss-lookup.target network.target remote-fs.target time-sync.target -After=nss-lookup.target network.target remote-fs.target time-sync.target postgresql.service mysql.service +After=nss-lookup.target network.target remote-fs.target time-sync.target postgresql.service mysql.service mariadb.service # Dependency about the database # We let administrators decide if they need it (if local db instance) # Wants=@DEFAULT_DB_TYPE@.service