]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Openafs fileserver upgrade support
authorSam Hartman <hartmans@debian.org>
Tue, 11 Sep 2001 19:28:46 +0000 (19:28 +0000)
committerSam Hartman <hartmans@debian.org>
Tue, 11 Sep 2001 19:28:46 +0000 (19:28 +0000)
debian/openafs-fileserver.config
debian/openafs-fileserver.postinst
debian/openafs-fileserver.preinst [new file with mode: 0644]
debian/openafs-fileserver.templates
debian/rules

index 9e27d4b60cbc8afb3eb8da4449a6c982ab65a7ec..035ccb487a6e353032ebc7912b53d9a401ad4b89 100644 (file)
@@ -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
index be50c436798d2c978987da43db687df30614986b..3ea7856ec026f63a4ab54e9de6d6eb08ccf5ca64 100644 (file)
@@ -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 (file)
index 0000000..6536fc0
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+set -e
+
+if [ upgrade = $1 ] ; then
+       . /usr/share/debconf/confmodule
+fi
+#DEBHELPER#
+
+exit 0
index 3706f05c9746865eb2b5eb2533675c6d7321d4a2..7d382ad34b75ade6cd9098654832147aa2813819 100644 (file)
@@ -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.
index 3a35fdecedb54f163f0a30231a926b544b1b1967..ef5ce2a6ae1aa9fc2c9f2f292e04288889f18ba4 100755 (executable)
@@ -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