]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
* Handle modules named either with or without the .mp extension on SMP
authorRuss Allbery <rra@debian.org>
Sun, 8 May 2005 04:01:11 +0000 (04:01 +0000)
committerRuss Allbery <rra@debian.org>
Sun, 8 May 2005 04:01:11 +0000 (04:01 +0000)
    hosts.  (Closes: #305389, #307280, #307797)

debian/changelog
src/afsd/afs.rc.linux

index b68762f55bfbf95e706cd24f78d8e68f68122807..abf1d6cbbe7b1991418ab544293045b3b1445852 100644 (file)
@@ -1,5 +1,7 @@
 openafs (1.3.81-5) unstable; urgency=low
 
+  * Handle modules named either with or without the .mp extension on SMP
+    hosts.  (Closes: #305389, #307280, #307797)
   * README.Debian: Document that the client cache partition must be ext2
     or ext3 and that XFS and ReiserFS will not work.  upserver and
     upclient are now provided.  Provide some information about why
@@ -34,7 +36,7 @@ openafs (1.3.81-5) unstable; urgency=low
   * Clean up and reformat package build rules.
   * Update lintian overrides.
 
- -- Russ Allbery <rra@stanford.edu>  Sat,  7 May 2005 14:34:28 -0700
+ -- Russ Allbery <rra@stanford.edu>  Sat,  7 May 2005 20:57:12 -0700
 
 openafs (1.3.81-4) unstable; urgency=low
 
index acb78450331cca75812132580cc1629f87440637..88a55eab3632767651f7220ba1b1a9d3d67ecfea 100644 (file)
@@ -53,7 +53,22 @@ choose_client() {
        # For now, just use uname -r to get the module version. 
        VERSION=`uname -r`
 
-       LIBAFS=openafs.*o
+        # The Debian OpenAFS packages do not add the .mp by default as of 1.3,
+        # but modules obtained from other sources may.  If a module with the
+        # .mp exists and this is an SMP system, use it; otherwise, use the
+        # default value.  Unset $MP if not using it so that we can use it
+        # later in the call to modprobe.
+        if [ -n "$MP" -a -f "$MODLOADDIR/openafs${MP}.o" ] ; then
+                LIBAFS=openafs${MP}.o
+        elif [ -n "$MP" -a -f "$MODLOADDIR/openafs${MP}.ko" ] ; then
+                LIBAFS=openafs${MP}.ko
+        elif [ -f "$MODLOADDIR/openafs.ko" ] ; then
+                MP=
+                LIBAFS=openafs.ko
+        else
+                MP=
+                LIBAFS=openafs.o
+        fi
 }
 
 #
@@ -120,18 +135,20 @@ load_client() {
                choose_client
        fi
     
-       if [ ! -f $MODLOADDIR/$LIBAFS ] ; then
-               echo AFS module $MODLOADDIR/$LIBAFS does not exist. Not starting AFS.
-               echo Please consider building kernel modules using instructions in
- echo /usr/share/doc/openafs-client/README.modules
+       if [ ! -f "$MODLOADDIR/$LIBAFS" ] ; then
+                echo <<EOF
+AFS module $MODLOADDIR/$LIBAFS does not exist.
+Not starting AFS.  Please consider building kernel modules using
+instructions in /usr/share/doc/openafs-client/README.modules
+EOF
                exit 0
        fi
 
        # use the prefix command if required
 #      set_prefix
-               LOADED=`/sbin/lsmod | fgrep openafs`
+       LOADED=`/sbin/lsmod | fgrep openafs`
        if [ -z "$LOADED" ] ; then
-       modprobe openafs
+                modprobe openafs${MP}
        fi
 }