]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Simplify the module naming code in openafs-client init
authorRuss Allbery <rra@debian.org>
Sat, 25 Sep 2010 04:08:29 +0000 (21:08 -0700)
committerRuss Allbery <rra@debian.org>
Sat, 25 Sep 2010 04:08:29 +0000 (21:08 -0700)
* In the openafs-client init script, stop looking for openafs.o; Debian
  hasn't supported 2.4 kernels for quite some time.  Remove all the $MP
  handling since we force a module name of openafs.ko using
  --with-linux-kernel-packaging.

debian/changelog
debian/openafs-client.init

index db35fcddb18e898459194112e69a6f618ea98714..9fee596014f54db2905778fced65fa969f34bdc5 100644 (file)
@@ -12,6 +12,10 @@ openafs (1.5.77-2) UNRELEASED; urgency=low
     Current kernel header packages will create an appropriate symlink
     there.  This default is only used when neither module-assistant nor
     kernel-package are used.
+  * In the openafs-client init script, stop looking for openafs.o; Debian
+    hasn't supported 2.4 kernels for quite some time.  Remove all the $MP
+    handling since we force a module name of openafs.ko using
+    --with-linux-kernel-packaging.
 
  -- Russ Allbery <rra@debian.org>  Fri, 24 Sep 2010 17:05:35 -0700
 
index 02de249b56e01a930331d9bcf8f18996272e211d..94360e640f1c34d83a242e9dd113c6c78168b411 100755 (executable)
@@ -49,48 +49,13 @@ is_on() {
     fi
 }
 
-# If choose_client can't correctly determine which client to use, set
-# LIBAFS manually.
-choose_client() {
-    # Use the second field of the uname -v output instead of just doing a
-    # match on the whole thing to protect against matching a timezone named
-    # SMP -- I don't know of one, but let's be paranoid.
-    set X `uname -v`; shift
-    case $2 in
-    SMP) MP=.mp ;;      # MP system
-    *)   MP=    ;;      # SP system
-    esac
-
-    # 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.
-    #
-    # Assume that if we're using DKMS, we won't have a .mp and we'll always
-    # have a *.ko module name.
-    if [ -f "$DKMSDIR/openafs.ko" ] ; then
-        LIBAFS=openafs.ko
-    elif [ -n "$MP" -a -f "$MODULEDIR/openafs${MP}.o" ] ; then
-        LIBAFS=openafs${MP}.o
-    elif [ -n "$MP" -a -f "$MODULEDIR/openafs${MP}.ko" ] ; then
-        LIBAFS=openafs${MP}.ko
-    elif [ -f "$MODULEDIR/openafs.ko" ] ; then
-        MP=
-        LIBAFS=openafs.ko
-    else
-        MP=
-        LIBAFS=openafs.o
-    fi
-}
-
 # Load the AFS client module if it's not already loaded.  Set $MODULEDIR and
 # $LIBAFS to override the default location and module name.  Also check before
 # loading whether the module is listed in the module dependencies so that we
 # can exit with a 0 status in that case.
 load_client() {
     if [ -z "$LIBAFS" ] ; then
-        choose_client
+        LIBAFS=openafs.ko
     fi
     if [ ! -f "$MODULEDIR/$LIBAFS" -a ! -f "$DKMSDIR/$LIBAFS" ] ; then
         echo ""