[xml/sgml-commit] r1745 - in /packages/w3c-markup-validator/trunk/debian/stuff: ./ postinst postrm prerm
periapt-guest at users.alioth.debian.org
periapt-guest at users.alioth.debian.org
Wed Aug 18 22:45:13 UTC 2010
Author: periapt-guest
Date: Wed Aug 18 22:45:13 2010
New Revision: 1745
URL: http://svn.debian.org/wsvn/debian-xml-sgml/?sc=1&rev=1745
Log:
old install scripts -- keep for safekeeping for now
Added:
packages/w3c-markup-validator/trunk/debian/stuff/
packages/w3c-markup-validator/trunk/debian/stuff/postinst
packages/w3c-markup-validator/trunk/debian/stuff/postrm
packages/w3c-markup-validator/trunk/debian/stuff/prerm
Added: packages/w3c-markup-validator/trunk/debian/stuff/postinst
URL: http://svn.debian.org/wsvn/debian-xml-sgml/packages/w3c-markup-validator/trunk/debian/stuff/postinst?rev=1745&op=file
==============================================================================
--- packages/w3c-markup-validator/trunk/debian/stuff/postinst (added)
+++ packages/w3c-markup-validator/trunk/debian/stuff/postinst Wed Aug 18 22:45:13 2010
@@ -1,0 +1,88 @@
+#! /bin/sh
+# postinst script for w3c-markup-validator
+#
+# see: dh_installdeb(1)
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# 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>
+# * <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
+#
+# quoting from the policy:
+# Any necessary prompting should almost always be confined to the
+# post-installation script, and should be protected with a conditional
+# so that unnecessary prompting doesn't happen if a package's
+# installation fails and the `postinst' is called with `abort-upgrade',
+# `abort-remove' or `abort-deconfigure'.
+
+case "$1" in
+ configure|reconfigure)
+
+ # Todo: what if dpkg-reconfigure is used ? Do we remove the install servers
+ # which disappeared ?
+
+ db_get w3c-markup-validator/webserver || true
+ webserver="$RET"
+ for singlewebserver in $webserver; do
+ # In case of multiple entries, remove the "," between the names
+ singlewebserver=$(echo "$singlewebserver" | sed 's/,//')
+
+ case "$singlewebserver" in
+ Apache2) webservers="$webservers apache2";;
+ Apache) webservers="$webservers apache";;
+ Apache-Perl) webservers="$webservers apache-perl";;
+ Apache-SSL) webservers="$webservers apache-ssl";;
+ *) webservers="";;
+ esac
+ done
+
+ for server in $webservers; do
+ test -d /etc/$server/conf.d || continue
+
+ if [ ! -s /etc/$server/conf.d/w3c-markup-validator.conf ]; then
+ ln -s /etc/w3c/w3c-markup-validator-$server.conf /etc/$server/conf.d/w3c-markup-validator.conf
+ # Transition from include-based configuration, if needed
+ . /usr/share/wwwconfig-common/apache-uninclude_all.sh
+ restart="$server $restart"
+ fi
+
+ done
+
+ servers="apache2 apache apache-perl apache-ssl"
+ . /usr/share/wwwconfig-common/restart.sh
+ if [ ! "$error" = "" ] ; then
+ echo "$error"
+ fi
+
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+db_stop
+
+exit 0
+
+
Added: packages/w3c-markup-validator/trunk/debian/stuff/postrm
URL: http://svn.debian.org/wsvn/debian-xml-sgml/packages/w3c-markup-validator/trunk/debian/stuff/postrm?rev=1745&op=file
==============================================================================
--- packages/w3c-markup-validator/trunk/debian/stuff/postrm (added)
+++ packages/w3c-markup-validator/trunk/debian/stuff/postrm Wed Aug 18 22:45:13 2010
@@ -1,0 +1,41 @@
+#! /bin/sh
+# postrm script for w3c-markup-validator
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+ remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+
+ ;;
+
+ purge)
+ rmdir /etc/w3c 2>/dev/null || true
+ ;;
+
+ *)
+ echo "postrm called with unknown argument \`$1'" >&2
+ exit 1
+
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
Added: packages/w3c-markup-validator/trunk/debian/stuff/prerm
URL: http://svn.debian.org/wsvn/debian-xml-sgml/packages/w3c-markup-validator/trunk/debian/stuff/prerm?rev=1745&op=file
==============================================================================
--- packages/w3c-markup-validator/trunk/debian/stuff/prerm (added)
+++ packages/w3c-markup-validator/trunk/debian/stuff/prerm Wed Aug 18 22:45:13 2010
@@ -1,0 +1,76 @@
+#! /bin/sh
+# prerm script for w3c-markup-validator
+#
+# see: dh_installdeb(1)
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# summary of how this script can be called:
+# * <prerm> `remove'
+# * <old-prerm> `upgrade' <new-version>
+# * <new-prerm> `failed-upgrade' <old-version>
+# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+# * <deconfigured's-prerm> `deconfigure' `in-favour'
+# <package-being-installed> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+ upgrade)
+ ;;
+ remove|deconfigure)
+
+ db_get w3c-markup-validator/webserver || true
+ webserver="$RET"
+ for singlewebserver in $webserver; do
+ # In case of multiple entries, remove the "," between the names
+ singlewebserver=$(echo "$singlewebserver" | sed 's/,//')
+
+ case "$singlewebserver" in
+ Apache2) webservers="$webservers apache2";;
+ Apache) webservers="$webservers apache";;
+ Apache-Perl) webservers="$webservers apache-perl";;
+ Apache-SSL) webservers="$webservers apache-ssl";;
+ *) webservers="";;
+ esac
+ done
+
+ for server in $webservers; do
+ test -d /etc/$server || continue
+
+ if [ -s /etc/$server/conf.d/w3c-markup-validator.conf ]; then
+ rm /etc/$server/conf.d/w3c-markup-validator.conf
+
+ restart="$server $restart"
+ fi
+ [ "$statut" = "purge" ] && restart="$server $restart"
+ done
+
+ servers="apache2 apache apache-perl apache-ssl"
+ /usr/share/wwwconfig-common/restart.sh
+
+ if [ ! "$error" = "" ] ; then
+ echo "$error"
+ fi
+
+ ;;
+ failed-upgrade)
+ ;;
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
+
More information about the debian-xml-sgml-commit
mailing list