[pinto] 01/02: Revert f8cc4dc4fabdcedaf7c19b0e0bcf9664129c1682.

Oleg Gashev oleg at gashev.net
Sun Oct 6 18:58:17 UTC 2013


This is an automated email from the git hooks/post-receive script.

gashev-guest pushed a commit to branch master
in repository pinto.

commit 4e2e19388007eceeada4fb87e2c2c272683d3de1
Author: Oleg Gashev <oleg at gashev.net>
Date:   Sun Oct 6 18:52:04 2013 +0000

    Revert f8cc4dc4fabdcedaf7c19b0e0bcf9664129c1682.
---
 debian/pinto.config     |   30 ++++++++++++++++++++++++++
 debian/pinto.postinst   |   13 +++++++-----
 debian/pinto.templates  |   17 +++++++++++++++
 debian/po/POTFILES.in   |    1 +
 debian/po/ru.po         |   54 +++++++++++++++++++++++++++++++++++++++++++++++
 debian/po/templates.pot |   51 ++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 161 insertions(+), 5 deletions(-)

diff --git a/debian/pinto.config b/debian/pinto.config
new file mode 100644
index 0000000..bab3750
--- /dev/null
+++ b/debian/pinto.config
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+passwordsmatch=''
+
+while [ ! "$passwordsmatch" ]; do
+    #only ask for a password if no htpasswd exists
+    test -f /etc/pinto/htpasswd.users && break
+    db_input high pinto/adminpassword || true
+    db_input high pinto/adminpassword-repeat || true
+    db_go || true
+    db_get pinto/adminpassword
+    p1="$RET"
+    db_get pinto/adminpassword-repeat
+    p2="$RET"
+    if [ "$p1" = "$p2" ]; then
+        passwordsmatch="yes"
+    else
+        db_fset pinto/adminpassword seen false
+        db_fset pinto/adminpassword-repeat seen false
+        db_fset pinto/adminpassword-mismatch seen false
+        db_input critical pinto/adminpassword-mismatch || true
+    fi
+done
+
+db_go || true
+
diff --git a/debian/pinto.postinst b/debian/pinto.postinst
index 1aecee5..509fcad 100644
--- a/debian/pinto.postinst
+++ b/debian/pinto.postinst
@@ -45,14 +45,17 @@ if [ "$1" = configure ]; then
         chmod 0750 /etc/pinto
     fi
 
+    db_get pinto/adminpassword
+    admpass="$RET"
     htpw='/etc/pinto/htpasswd.users'
 
-    if [ ! -e "$htpw" ]; then
-        echo 'Please provide the password to the "pintoadmin" user.'
-        htpasswd -c "$htpw" pintoadmin
-        chown pinto:pinto "$htpw"
-        chmod 0400 "$htpw"
+    if [ -n "$admpass" ]; then
+        touch "$htpw"
+        htpasswd -b "$htpw" pintoadmin "$admpass"
     fi
+
+    db_set pinto/adminpassword ""
+    db_set pinto/adminpassword-repeat ""
 fi
 
 #DEBHELPER#
diff --git a/debian/pinto.templates b/debian/pinto.templates
new file mode 100644
index 0000000..2aa4f77
--- /dev/null
+++ b/debian/pinto.templates
@@ -0,0 +1,17 @@
+Template: pinto/adminpassword
+Type: password
+_Description: Pinto web administration password:
+ Please provide the password to be created with the "pintoadmin" user.
+ .
+ This is the username and password you will use to log in to your pinto
+ installation after configuration is complete. If you do not provide a
+ password, you will have to configure access to pinto yourself.
+
+Template: pinto/adminpassword-repeat
+Type: password
+_Description: Password confirmation:
+
+Template: pinto/adminpassword-mismatch
+Type: note
+_Description: The passwords do not match
+
diff --git a/debian/po/POTFILES.in b/debian/po/POTFILES.in
new file mode 100644
index 0000000..8e8fea6
--- /dev/null
+++ b/debian/po/POTFILES.in
@@ -0,0 +1 @@
+[type: gettext/rfc822deb] pinto.templates
diff --git a/debian/po/ru.po b/debian/po/ru.po
new file mode 100644
index 0000000..d97990a
--- /dev/null
+++ b/debian/po/ru.po
@@ -0,0 +1,54 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the pinto package.
+# Oleg Gashev <oleg at gashev.net>, 2013.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: pinto\n"
+"Report-Msgid-Bugs-To: pinto at packages.debian.org\n"
+"POT-Creation-Date: 2013-07-27 07:13-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: Oleg Gashev <oleg at gashev.net>\n"
+"Language-Team: Russian <debian-l10n-russian at lists.debian.org>\n"
+"Language: ru\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: password
+#. Description
+#: ../pinto.templates:1001
+msgid "Pinto web administration password:"
+msgstr "Пароль для веб-администрирования Pinto:"
+
+#. Type: password
+#. Description
+#: ../pinto.templates:1001
+msgid "Please provide the password to be created with the \"pintoadmin\" user."
+msgstr "Введите пароль для создаваемой учётной записи \"pintoadmin\"."
+
+#. Type: password
+#. Description
+#: ../pinto.templates:1001
+msgid ""
+"This is the username and password you will use to log in to your pinto "
+"installation after configuration is complete. If you do not provide a "
+"password, you will have to configure access to pinto yourself."
+msgstr ""
+"Вы будете использовать эту учётную запись и пароль для доступа к pinto "
+"после завершения настройки. Если вы не укажите пароль, то вам нужно будет "
+"настроить доступ к pinto самостоятельно."
+
+#. Type: password
+#. Description
+#: ../pinto.templates:2001
+msgid "Password confirmation:"
+msgstr "Введите пароль ещё раз:"
+
+#. Type: note
+#. Description
+#: ../pinto.templates:3001
+msgid "The passwords do not match"
+msgstr "Пароли не совпадают"
+
diff --git a/debian/po/templates.pot b/debian/po/templates.pot
new file mode 100644
index 0000000..b58625e
--- /dev/null
+++ b/debian/po/templates.pot
@@ -0,0 +1,51 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: pinto\n"
+"Report-Msgid-Bugs-To: pinto at packages.debian.org\n"
+"POT-Creation-Date: 2013-07-27 07:13-0400\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: password
+#. Description
+#: ../pinto.templates:1001
+msgid "Pinto web administration password:"
+msgstr ""
+
+#. Type: password
+#. Description
+#: ../pinto.templates:1001
+msgid "Please provide the password to be created with the \"pintoadmin\" user."
+msgstr ""
+
+#. Type: password
+#. Description
+#: ../pinto.templates:1001
+msgid ""
+"This is the username and password you will use to log in to your pinto "
+"installation after configuration is complete. If you do not provide a "
+"password, you will have to configure access to pinto yourself."
+msgstr ""
+
+#. Type: password
+#. Description
+#: ../pinto.templates:2001
+msgid "Password confirmation:"
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../pinto.templates:3001
+msgid "The passwords do not match"
+msgstr ""

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/pinto.git



More information about the Pkg-perl-cvs-commits mailing list