From 3122077603c846aa131650b99c30b79c59a6fc6a Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Thu, 18 Feb 2021 01:12:26 +0100 Subject: [PATCH] fix debconf password questions --- debian/openwebrx.config | 2 +- debian/openwebrx.postinst | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/debian/openwebrx.config b/debian/openwebrx.config index 08364d9..7599342 100755 --- a/debian/openwebrx.config +++ b/debian/openwebrx.config @@ -2,5 +2,5 @@ . /usr/share/debconf/confmodule -db_input medium openwebrx/admin_user_password +db_input medium openwebrx/admin_user_password || true db_go diff --git a/debian/openwebrx.postinst b/debian/openwebrx.postinst index a2b1e9e..78ba051 100755 --- a/debian/openwebrx.postinst +++ b/debian/openwebrx.postinst @@ -17,11 +17,11 @@ case "$1" in # create initial openwebrx user db_get openwebrx/admin_user_password - if [ "${RET}" != "__DONE__" ]; then + if [ ! -z "${RET}" ] && [ "${RET}" != "__DONE__" ]; then OWRX_PASSWORD="${RET}" openwebrx-admin --noninteractive --silent adduser admin + # remove actual password from debconf database, but leave a marker + db_set openwebrx/admin_user_password "__DONE__" fi - # remove actual password from debconf database, but leave a marker - db_set openwebrx/admin_user_password "__DONE__" ;; *) echo "postinst called with unknown argument '$1'" 1>&2