[Lunar-commits] <moonbase-other> openafs-driver: Refactoring. Kernel module is now tracked.

Stefan Wold ratler at lunar-linux.org
Sun Sep 15 15:28:59 CEST 2013


commit 9e8592f298fa91bdd19a3a467c87f85459c9d6d0
Author: Stefan Wold <ratler at lunar-linux.org>
Date: Sat, 14 Sep 2013 14:48:34 -0700
URL: https://github.com/lunar-linux/moonbase-other/commit/9e8592f298fa91bdd19a3a467c87f85459c9d6d0

openafs-driver: Refactoring. Kernel module is now tracked.
---
  filesys/openafs-driver/BUILD        | +10/-4    
  filesys/openafs-driver/DETAILS      | +0/-1     
  filesys/openafs-driver/POST_INSTALL | +0/-33    
  3 files changed, 10 insertions(+), 38 deletions(-)

--- a/filesys/openafs-driver/BUILD
+++ b/filesys/openafs-driver/BUILD
@@ -12,13 +12,13 @@ esac &&
 
 case `arch` in
   x86_64)
-    OPTS+=" --with-afs-sysname=amd64_linux${kv}"
+    sysname="amd64_linux${kv}"
     ;;
   i386|i486|i586|i686|athlon)
-    OPTS+=" --with-afs-sysname=i386_linux${kv}"
+    sysname="i386_linux${kv}"
     ;;
   *)
-    OPTS+=" --with-afs-sysname=`arch`_linux${kv}"
+    sysname="`arch`_linux${kv}"
     ;;
 esac &&
 
@@ -28,6 +28,12 @@ esac &&
               --localstatedir=/var/lib        \
               --infodir=/usr/share/info       \
               --mandir=/usr/share/man         \
+              --with-afs-sysname=$sysname     \
               $OPTS                           &&
 make only_libafs &&
-prepare_install
+prepare_install &&
+
+MODDIR=$(expr $SOURCE_DIRECTORY/src/libafs/MODLOAD-*) &&
+KVER=$(echo ${MODDIR##*/} | awk -F- '{ print $2 }') &&
+[ -f ${MODDIR}/libafs.ko ] &&
+install -D -m 644 $MODDIR/libafs.ko /lib/modules/${KVER}/kernel/fs/openafs/libafs.ko
--- a/filesys/openafs-driver/DETAILS
+++ b/filesys/openafs-driver/DETAILS
@@ -9,7 +9,6 @@ SOURCE_DIRECTORY=$BUILD_DIRECTORY/openafs-$VERSION
          UPDATED=20130912
       MAINTAINER="ratler at lunar-linux.org"
            SHORT="OpenAFS kernel module"
-PROFILE="yes"
 PSAFE="no"
 
 cat << EOF
--- a/filesys/openafs-driver/POST_INSTALL
+++ b/filesys/openafs-driver/POST_INSTALL
@@ -1,37 +1,4 @@
-case `uname -r` in
-  2.6.*|3.*) 
-    kv="26"
-    ;;
-  *) 
-    message "Unsupported kernel version!"
-    exit -1
-    ;;
-esac
-
-case `arch` in
-  x86_64)
-    sysname="amd64_linux${kv}"
-    ;;
-  i386|i486|i586|i686|athlon)
-    sysname="i386_linux${kv}"
-    ;;
-  *)
-    sysname="`arch`_linux${kv}"
-    ;;
-esac
-
-
 MODDIR=$(expr $SOURCE_DIRECTORY/src/libafs/MODLOAD-*)
 KVER=$(echo ${MODDIR##*/} | awk -F- '{ print $2 }')
 
-if [ "$kv" == "26" ]; then
-  [ -f ${MODDIR}/libafs.ko ] || exit -1
-  mkdir -p /lib/modules/${KVER}/kernel/fs/openafs
-  install -m 644 $MODDIR/libafs.ko /lib/modules/${KVER}/kernel/fs/openafs || exit -1
-else
-  [ -f ${MODDIR}/libafs.o ] || exit -1
-  mkdir -p /lib/modules/${KVER}/kernel/fs/openafs
-  install -m 644 $MODDIR/libafs.o /lib/modules/${KVER}/kernel/fs/openafs || exit -1
-fi
-
 depmod -a $KVER




More information about the Lunar-commits mailing list