[Pkg-uml-commit] r105 - trunk/src/user-mode-linux/debian
Mattia Dongili
malattia at costa.debian.org
Sat May 27 18:27:29 UTC 2006
Author: malattia
Date: 2006-05-27 18:27:20 +0000 (Sat, 27 May 2006)
New Revision: 105
Added:
trunk/src/user-mode-linux/debian/postinst
trunk/src/user-mode-linux/debian/prerm
Log:
here is the actual implementation of update-alternatives
Added: trunk/src/user-mode-linux/debian/postinst
===================================================================
--- trunk/src/user-mode-linux/debian/postinst 2006-05-27 18:26:25 UTC (rev 104)
+++ trunk/src/user-mode-linux/debian/postinst 2006-05-27 18:27:20 UTC (rev 105)
@@ -0,0 +1,56 @@
+#! /bin/sh
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+
+# Abort if any command returns an error value
+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>
+# * <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)
+ # Make our version of a program available
+ update-alternatives \
+ --install /usr/bin/linux linux /usr/bin/linux.uml 10 \
+ --slave /usr/share/man/man1/linux.1.gz linux.1.gz \
+ /usr/share/man/man1/linux.uml.1.gz
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
Property changes on: trunk/src/user-mode-linux/debian/postinst
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/src/user-mode-linux/debian/prerm
===================================================================
--- trunk/src/user-mode-linux/debian/prerm 2006-05-27 18:26:25 UTC (rev 104)
+++ trunk/src/user-mode-linux/debian/prerm 2006-05-27 18:27:20 UTC (rev 105)
@@ -0,0 +1,46 @@
+#! /bin/sh
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+
+# Abort if any command returns an error value
+set -e
+
+# 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
+ remove)
+ # Withdraw our version of a program.
+ update-alternatives --remove linux /usr/bin/linux.uml
+ ;;
+
+ upgrade|deconfigure|failed-upgrade)
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
Property changes on: trunk/src/user-mode-linux/debian/prerm
___________________________________________________________________
Name: svn:executable
+ *
More information about the Pkg-uml-commit
mailing list