X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=src%2Fscripts%2Fcheck_services;h=fe14ad7a3eaf8c40cc6569ffa26349b4f36089f0;hb=35b0606e4de22a3820238d92adaaaba7fc441e81;hp=05f5119ae540e9fd8a236ff60633b67a1183289d;hpb=506efb2dc8049be2ce0cfbbe67ab9b0230883470;p=carnet-upgrade.git diff --git a/src/scripts/check_services b/src/scripts/check_services index 05f5119..fe14ad7 100755 --- a/src/scripts/check_services +++ b/src/scripts/check_services @@ -1,7 +1,6 @@ #!/bin/bash -# Load debconf stuff -. /usr/share/debconf/confmodule +STORE=/var/lib/carnet-upgrade/check-services # Load nase funkcije . /usr/share/carnet-upgrade/data.sh @@ -20,10 +19,10 @@ cs_preupgrade () { fi fi done + services=${services# } if [ -n "$services" ]; then - db_set carnet-upgrade/check-services "$services" - db_go || true + echo "$services" > $STORE fi } @@ -58,8 +57,8 @@ cs_postupgrade () { ;; esac - db_get carnet-upgrade/check-services || true - services="${RET// /|}" + services=$(test -f $STORE && cat $STORE) + services="${services// /|}" failed_services=$( echo "$services_to_check" \ @@ -75,22 +74,22 @@ cs_postupgrade () { fi } -# checkiraj da li je sto zapisano u debconf +# checkiraj da li je sto zapisano cs_check () { - db_get carnet-upgrade/check-services || true - debconf="$RET" + services=$(test -f $STORE && cat $STORE) - if [ -n "$debconf" ]; then + if [ -n "$services" ]; then exit 0 else exit 1 fi } -# prikazi sto je zapisano u debconf +# prikazi sto je zapisano cs_show () { - db_get carnet-upgrade/check-services || true - echo "$RET" + services=$(test -f $STORE && cat $STORE) + + echo "$services" } case "$1" in