From 88fe32c5b26750e3faa30fd6062fa4c946df9098 Mon Sep 17 00:00:00 2001 From: Ivan Rako Date: Fri, 22 Apr 2011 12:52:25 +0200 Subject: [PATCH] izmijenjen config --- debian/config | 38 -------------------------------------- debian/postinst | 45 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 38 deletions(-) create mode 100755 debian/postinst diff --git a/debian/config b/debian/config index 9035bf7..3a6967f 100755 --- a/debian/config +++ b/debian/config @@ -2,44 +2,6 @@ set -e -[ "$1" = "configure" ] || exit 0 - # Load debconf . /usr/share/debconf/confmodule db_version 2.0 - -while true; do - db_fset carnet-debian/packages seen false - db_go || true - db_input critical carnet-debian/packages || true - db_go || true - - db_get carnet-debian/packages - packages="$RET" - if echo $packages | grep -q vsftpd-cn; then - vsftpd="yes" - else - vsftpd="no" - fi - - if echo $packages | grep -q proftpd-cn; then - proftpd="yes" - else - proftpd="no" - fi - - if [ "$proftpd" = "yes" -a "$vsftpd" = "yes" ]; then - db_fset carnet-debian/ftpd seen false - db_go || true - db_input critical carnet-debian/ftpd || true - else - break - fi -done - -db_fset carnet-debian/note seen false -db_go || true -db_input critical carnet-debian/note || true - -db_go || true -db_stop || true diff --git a/debian/postinst b/debian/postinst new file mode 100755 index 0000000..9035bf7 --- /dev/null +++ b/debian/postinst @@ -0,0 +1,45 @@ +#!/bin/sh + +set -e + +[ "$1" = "configure" ] || exit 0 + +# Load debconf +. /usr/share/debconf/confmodule +db_version 2.0 + +while true; do + db_fset carnet-debian/packages seen false + db_go || true + db_input critical carnet-debian/packages || true + db_go || true + + db_get carnet-debian/packages + packages="$RET" + if echo $packages | grep -q vsftpd-cn; then + vsftpd="yes" + else + vsftpd="no" + fi + + if echo $packages | grep -q proftpd-cn; then + proftpd="yes" + else + proftpd="no" + fi + + if [ "$proftpd" = "yes" -a "$vsftpd" = "yes" ]; then + db_fset carnet-debian/ftpd seen false + db_go || true + db_input critical carnet-debian/ftpd || true + else + break + fi +done + +db_fset carnet-debian/note seen false +db_go || true +db_input critical carnet-debian/note || true + +db_go || true +db_stop || true -- 1.7.10.4