izmijenjen config
authorIvan Rako <irako@nekkar.carnet.hr>
Fri, 22 Apr 2011 10:52:25 +0000 (12:52 +0200)
committerIvan Rako <irako@nekkar.carnet.hr>
Fri, 22 Apr 2011 10:52:25 +0000 (12:52 +0200)
debian/config
debian/postinst [new file with mode: 0755]

index 9035bf7..3a6967f 100755 (executable)
@@ -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 (executable)
index 0000000..9035bf7
--- /dev/null
@@ -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