summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Camera <skonfig@dtnr.ch>2023-06-10 18:13:24 +0200
committerDennis Camera <skonfig@dtnr.ch>2023-06-10 18:13:24 +0200
commit6c76710f58120635d62135d9ad1337afdfe564b3 (patch)
treeeb6f388eed1152ed726998dbcd0b7b736637ce4c
parentf72fc70d80b6a8e32be99151a9232a9dc5e67820 (diff)
download__dtnrch_egov-6c76710f58120635d62135d9ad1337afdfe564b3.tar.gz
__dtnrch_egov-6c76710f58120635d62135d9ad1337afdfe564b3.zip
[type/__dtnrch_etax_flnp] Handle failed download
-rwxr-xr-xtype/__dtnrch_etax_flnp/manifest13
1 files changed, 10 insertions, 3 deletions
diff --git a/type/__dtnrch_etax_flnp/manifest b/type/__dtnrch_etax_flnp/manifest
index dbd49ec..c7c8fca 100755
--- a/type/__dtnrch_etax_flnp/manifest
+++ b/type/__dtnrch_etax_flnp/manifest
@@ -1,6 +1,6 @@
#!/bin/sh -e
#
-# 2021 Dennis Camera (cdist at dtnr.ch)
+# 2021,2023 Dennis Camera (skonfig at dtnr.ch)
#
# This file is part of cdist.
#
@@ -105,7 +105,8 @@ esac
case ${FILENAME}
in
(*.deb)
- deb_name=${FILENAME:?}
+ : "${FILENAME:?}"
+ deb_name=${FILENAME%%_[0-9]}
if test "${state_should}" != 'absent'
then
@@ -127,6 +128,10 @@ in
unset _url
fi
+ test -f "${local_file}" || {
+ echo 'Download of installation DEB failed.' >&2
+ exit 1
+ }
test -n "${CKSUM-}" || {
echo 'Do not know the correct cksum.' >&2
exit 1
@@ -151,7 +156,7 @@ in
--purge-if-absent
test "${state_should}" = 'absent' ||
- export require="${require-}${require:+ }__package_dpkg/${deb_name}"
+ require="${require-}${require:+ }__package_dpkg/${deb_name}"
;;
(*)
printf 'Support for this file type not implemented: %s\n' "${FILENAME##*.}" >&2
@@ -159,6 +164,8 @@ in
;;
esac
+export require
+
################################################################################
# Replace JVM (if requested)