--- /dev/null
+#!/bin/sh
+
+set -e
+
+# Load debconf
+. /usr/share/debconf/confmodule
+db_version 2.0
+
+# Show dialogs if started from postinst
+if [ "$CN_POSTINST" ]; then
+ rm -f /var/lib/carnet-upgrade/debconf-priority 2>/dev/null
+ rm -f /var/lib/carnet-upgrade/check-services 2>/dev/null
+
+ # display installation notice for new version
+ db_fset carnet-upgrade/short-instructions seen false
+ db_input high carnet-upgrade/short-instructions || true
+fi
+
+db_go || true
+db_stop || true
Priority: extra
Maintainer: Grupa za izradu paketa <paketi@carnet.hr>
Uploaders: Valentin Vidic <Valentin.Vidic@CARNet.hr>
-Build-Depends: debhelper (>= 7), debiandoc-sgml, texlive, texlive-latex-extra,
- ghostscript
+Build-Depends: debhelper (>= 7), po-debconf, debiandoc-sgml, texlive,
+ texlive-latex-extra, ghostscript
Standards-Version: 3.9.1
Package: carnet-upgrade
--- /dev/null
+Copyright 2011 CARNet <paketi@carnet.hr>
+
+You are free to distribute this software package under the terms of the
+GNU General Public License.
+
+On Debian systems, the complete text of the GNU General Public
+License can be found in the file /usr/share/common-licenses/GPL.
--- /dev/null
+doc/carnet-upgrade.8
--- /dev/null
+[type: gettext/rfc822deb] templates
--- /dev/null
+# 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@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: carnet-upgrade@packages.debian.org\n"
+"POT-Creation-Date: 2011-09-30 14:20+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: note
+#. Description
+#: ../templates:1001
+msgid "CARNet Debian 6.0 (squeeze) nadogradnja"
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../templates:1001
+msgid ""
+"Instalirali ste paket carnet-upgrade za nadogradnju sa CARNet Debian 5.0 "
+"(lenny) na CARNet Debian 6.0 (squeeze)."
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../templates:1001
+msgid ""
+"Prije pocetka nadogradnje napravite backup cijelog sustava i procitajte "
+"dokumentaciju u /usr/share/doc/carnet-upgrade/ ili na webu: http://sistemac."
+"carnet.hr/system/files/carnet-upgrade.pdf"
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../templates:1001
+msgid ""
+"Ukoliko niste restartali posluzitelj nakon instalacije kernela, restartajte "
+"ga prije pokretanja nadogradnje. Ukoliko nemate barem 100 MB slobodnog "
+"mjesta na / particiji procitajte upute na webu: http://sistemac.carnet.hr/"
+"node/401"
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../templates:1001
+msgid "Nadogradnju pokrenite kao root sa 'carnet-upgrade'."
+msgstr ""
#!/bin/sh
-# postinst script for carnet-upgrade
-#
-# see: dh_installdeb(1)
set -e
-# summary of how this script can be called:
-# * <postinst> `configure' <most-recently-configured-version>
-# * <old-postinst> `abort-upgrade' <new version>
-# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
-# <new-version>
-# * <postinst> `abort-remove'
-# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
-# <failed-install-package> <version> `removing'
-# <conflicting-package> <version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
+[ "$1" = "configure" ] || exit 0
-
-case "$1" in
- configure)
- ;;
-
- abort-upgrade|abort-remove|abort-deconfigure)
- ;;
-
- *)
- echo "postinst called with unknown argument \`$1'" >&2
- exit 1
- ;;
-esac
-
-if [ "$1" = "configure" ] && [ -e /usr/share/debconf/confmodule ]; then
- . /usr/share/debconf/confmodule
-
- # clear old cached values
- if dpkg --compare-versions "$2" lt 6.0; then
- db_set carnet-upgrade/debconf-priority ""
- db_set carnet-upgrade/check-services ""
-
- # display installation notice for new version
- db_fset carnet-upgrade/short-instructions seen false
- db_input high carnet-upgrade/short-instructions || true
- db_go
- fi
+# clear old cached values
+if dpkg --compare-versions "$2" lt 6.0; then
+ export CN_POSTINST=1
fi
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
+# Load debconf
+. /usr/share/debconf/confmodule
+db_version 2.0
#DEBHELPER#
-
-exit 0
-Template: carnet-upgrade/debconf-priority
-Type: string
-Description: for internal use
-
-Template: carnet-upgrade/check-services
-Type: string
-Description: for internal use
-
Template: carnet-upgrade/short-instructions
Type: note
-Description: CARNet Debian 6.0 (squeeze) nadogradnja
+_Description: CARNet Debian 6.0 (squeeze) nadogradnja
Instalirali ste paket carnet-upgrade za nadogradnju sa CARNet Debian
5.0 (lenny) na CARNet Debian 6.0 (squeeze).
.
--- /dev/null
+.TH carnet-upgrade 8 "September 2011" CARNet "CARNet Debian Commands"
+.SH NAME
+carnet-upgrade \- Upgrade scripts for CARNet Debian distribution
+.SH SYNOPSIS
+.B carnet-upgrade
+.SH DESCRIPTION
+.PP
+This is script for upgrading CARNet Debian distribution to a new
+major release.
+.SH AUTHOR
+Written by Valentin Vidic <Valentin.Vidic@CARNet.hr>,
+Ivan.Rako <Ivan.Rako@CARNet.hr>
+.SH "REPORTING BUGS"
+Report bugs to <paketi@CARNet.hr>.
+.SH COPYRIGHT
+Copyright 2011 CARNet <paketi@carnet.hr>
+.PP
+You are free to distribute this software package under the terms of the GNU
+General Public License.
+.PP
+On Debian systems, the complete text of the GNU General Public License can
+be found in the file /usr/share/common-licenses/GPL.
#!/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
done
if [ -n "$services" ]; then
- db_set carnet-upgrade/check-services "$services"
- db_go || true
+ echo "${services# }" > $STORE
fi
}
;;
esac
- db_get carnet-upgrade/check-services || true
- services="${RET// /|}"
+ services=$(test -f $STORE && cat $STORE)
+ services="${services// /|}"
failed_services=$(
echo "$services_to_check" \
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
#!/bin/bash
-# Load debconf stuff
-. /usr/share/debconf/confmodule
+STORE=/var/lib/carnet-upgrade/debconf-priority
# setiraj debconf na high i spremi stari
debconf_priority_preupgrade () {
local old_debconf
- db_get debconf/priority || true
- old_debconf="$RET"
+ old_debconf=$(debconf-show debconf | sed -n '/debconf\/priority: /s///p')
if [ -n "$old_debconf" ]; then
- db_set carnet-upgrade/debconf-priority "$old_debconf"
+ echo "$old_debconf" > $STORE
fi
- db_set debconf/priority high
- db_go || true
+ echo set debconf/priority high | debconf-communicate
}
debconf_priority_postupgrade () {
local new_debconf
- db_get carnet-upgrade/debconf-priority || true
- new_debconf="$RET"
+ new_debconf=$(test -f $STORE && cat $STORE)
if [ -n "$new_debconf" ]; then
- db_set debconf/priority "$new_debconf"
- db_set carnet-upgrade/debconf-priority ""
+ echo set debconf/priority "$new_debconf" | debconf-communicate
+ rm -f $STORE
fi
-
- db_go || true
}
# checkiraj
debconf_priority_check () {
- db_get carnet-upgrade/debconf-priority || true
- debconf="$RET"
+ debconf=$(test -f $STORE && cat $STORE)
if [ -n "$debconf" ]; then
exit 0