From a6ced41428fff1216ee47514e6c510839ddfa7a3 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Fri, 13 May 2005 01:20:43 +0000 Subject: [PATCH] * In the init script, handle modules named either with or without the .mp extension on SMP hosts. (Closes: #305389, #307280, #307797) --- debian/changelog | 2 ++ src/afsd/afs.rc.linux | 31 ++++++++++++++++++++++++------- 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/debian/changelog b/debian/changelog index accaef2d0..871f24ebc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ openafs (1.3.81-3sarge1) unstable; urgency=low * libpam-openafs-kaserver: Fix compilation so that the PAM module isn't missing symbols and therefore unusable. (Closes: #308844) + * In the init script, handle modules named either with or without the + .mp extension on SMP hosts. (Closes: #305389, #307280, #307797) -- diff --git a/src/afsd/afs.rc.linux b/src/afsd/afs.rc.linux index acb784503..88a55eab3 100644 --- a/src/afsd/afs.rc.linux +++ b/src/afsd/afs.rc.linux @@ -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 <