From: Ivan Rako Date: Fri, 22 Apr 2011 10:52:25 +0000 (+0200) Subject: izmijenjen config X-Git-Tag: debian/6.0.0~8 X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=commitdiff_plain;h=88fe32c5b26750e3faa30fd6062fa4c946df9098;p=carnet-debian.git izmijenjen config --- 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