From: Sam Hartman Date: Tue, 11 Sep 2001 19:28:46 +0000 (+0000) Subject: Openafs fileserver upgrade support X-Git-Tag: debian/1.2.0-1~8 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=b0a0499e8ea5a6ac9bea1e836d64aa87f5d12a2b;p=packages%2Fo%2Fopenafs.git Openafs fileserver upgrade support --- diff --git a/debian/openafs-fileserver.config b/debian/openafs-fileserver.config index 9e27d4b60..035ccb487 100644 --- a/debian/openafs-fileserver.config +++ b/debian/openafs-fileserver.config @@ -15,4 +15,16 @@ if [ "x$RET" = "x" ] ; then fi db_input low openafs-fileserver/thiscell || true +if [ "x$2" != "x" ] ; then + if dpkg --compare-versions $2 lt 1.2.0-1 ; then + db_input high openafs-fileserver/bosconfig_moved ||true + fi +fi + db_go + +db_get openafs-fileserver/bosconfig_moved +if [ $RET = "false" ] ; then + db_reset openafs-fileserver/bosconfig_moved + exit 2 +fi diff --git a/debian/openafs-fileserver.postinst b/debian/openafs-fileserver.postinst index be50c4367..3ea7856ec 100644 --- a/debian/openafs-fileserver.postinst +++ b/debian/openafs-fileserver.postinst @@ -21,6 +21,11 @@ case "$1" in if [ -f /etc/openafs/server/CellServDB ] ; then : else echo \>$RET >/etc/openafs/server/CellServDB fi + if [ "x$2" != "x" ] ; then + if dpkg --compare-versions $2 lt 1.2.0-1 ; then + mv /etc/openafs/server-local/BosConfig /etc/openafs/BosConfig ||true + mv /etc/openafs/server-local/sysid /var/lib/openafs ||true + fi ;; diff --git a/debian/openafs-fileserver.preinst b/debian/openafs-fileserver.preinst new file mode 100644 index 000000000..6536fc0de --- /dev/null +++ b/debian/openafs-fileserver.preinst @@ -0,0 +1,9 @@ +#!/bin/sh +set -e + +if [ upgrade = $1 ] ; then + . /usr/share/debconf/confmodule +fi +#DEBHELPER# + +exit 0 diff --git a/debian/openafs-fileserver.templates b/debian/openafs-fileserver.templates index 3706f05c9..7d382ad34 100644 --- a/debian/openafs-fileserver.templates +++ b/debian/openafs-fileserver.templates @@ -5,3 +5,14 @@ Description: What cell does this server serve files for? Kerberos service and serve volumes into that cell. Normally, this cell is the same cell as the workstation's client belongs to. +template: openafs-fileserver/bosconfig_moved +Type: boolean +default: true +Description: Upgrading will move files to new locations; continue? + Between Openafs 1.1 and Openafs 1.2, several files moved. In + particular, files in /etc/openafs/server-local have been distributed + to other locations. The BosConfig file is now located in + /etc/openafs and the other files are located in /var/lib/openafs. If + you continue with this upgrade, these files will be moved. You should + use the bos restart command to reload your servers. Any + configuration changes made before you do so will be lost. diff --git a/debian/rules b/debian/rules index 3a35fdece..ef5ce2a6a 100755 --- a/debian/rules +++ b/debian/rules @@ -38,7 +38,9 @@ configure-stamp: -ln -s @sys/dest dest -ln -s $(SYS_NAME) @sys # sh regen.sh - sh configure --with-afs-sysname=$(SYS_NAME) --disable-kernel-module + afslogsdir=/var/log/openafs sh configure --with-afs-sysname=$(SYS_NAME) --disable-kernel-module \ + --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib \ + --localstatedir=/var/lib install -d $(SYS_NAME)/dest/root.client/usr/vice/etc install -d dest/root.server/usr/afs/bin @@ -48,7 +50,7 @@ build: configure-stamp build-stamp build-stamp: dh_testdir - $(MAKE) + $(MAKE) dest -rm $(SYS_NAME)/dest/include/crypt.h touch build-stamp @@ -228,7 +230,7 @@ build-modules-stamp: -ln -s @sys/dest dest -ln -s $(SYS_NAME) @sys sh configure --with-afs-sysname=$(SYS_NAME) --with-linux-kernel-headers=$(KSRC) - $(MAKE) libafs "COMPILE_PART1=cd src; cd" "COMPILE_PART2=; $(MAKE) install SYS_NAME=${SYS_NAME} DESTDIR=`pwd`/${SYS_NAME}/dest/ TOP_SRCDIR=`pwd`/src SRCDIR=`pwd`/${SYS_NAME}/dest/" "COMPILE_PART3=; $(MAKE) test SYS_NAME=${SYS_NAME} DESTDIR=`pwd`/${SYS_NAME}/dest/ TOP_SRCDIR=`pwd`/src SRCDIR=`pwd`/${SYS_NAME}/dest/" "COMPILE_CLEAN=; $(MAKE) clean SYS_NAME=${SYS_NAME} DESTDIR=`pwd`/${SYS_NAME}/dest/ TOP_SRCDIR=`pwd`/src SRCDIR=`pwd`/${SYS_NAME}/dest/" SYS_NAME=${SYS_NAME} + make dest_only_libafs touch build-modules-stamp binary-modules: build-modules