From 0fce0224b224bed04dc0edca47a4722520807844 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Fri, 24 Sep 2010 21:08:29 -0700 Subject: [PATCH] Simplify the module naming code in openafs-client init * 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 | 4 ++++ debian/openafs-client.init | 37 +------------------------------------ 2 files changed, 5 insertions(+), 36 deletions(-) diff --git a/debian/changelog b/debian/changelog index db35fcddb..9fee59601 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Fri, 24 Sep 2010 17:05:35 -0700 diff --git a/debian/openafs-client.init b/debian/openafs-client.init index 02de249b5..94360e640 100755 --- a/debian/openafs-client.init +++ b/debian/openafs-client.init @@ -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 "" -- 2.39.5