[Lunar-commits] openafs, openafs-driver: Version bump to 1.4.6, init.d script cleanup.

Stefan Wold ratler at lunar-linux.org
Fri Dec 28 09:56:38 CET 2007


commit 7e81d3465bc4e10be260e399fc7514903b6f991f
Author: Stefan Wold <ratler at lunar-linux.org>
Date:   Fri Dec 28 09:56:38 2007 +0100

    openafs, openafs-driver: Version bump to 1.4.6, init.d script cleanup.
---
 filesys/openafs/DETAILS       |    8 +-
 filesys/openafs/init.d/afs    |  125 +++++++++++++++++++++--------------------
 kernel/openafs-driver/DETAILS |    6 +-
 3 files changed, 72 insertions(+), 67 deletions(-)

diff --git a/filesys/openafs/DETAILS b/filesys/openafs/DETAILS
index 7acddd9..bca45af 100644
--- a/filesys/openafs/DETAILS
+++ b/filesys/openafs/DETAILS
@@ -1,5 +1,5 @@
         MODULE=openafs
-       VERSION=1.4.5
+       VERSION=1.4.6
         SOURCE=openafs-$VERSION-src.tar.bz2
        SOURCE2=CellServDB
        SOURCE3=killafs-0.1
@@ -12,14 +12,14 @@
    SOURCE4_URL=$PATCH_URL
    SOURCE5_URL=$PATCH_URL
    SOURCE6_URL=$PATCH_URL
-      WEB_SITE=http://www.openafs.org/
-    SOURCE_VFY=sha1:b9c8aaab204487e82ac8de261a2088e4eb145297
+    SOURCE_VFY=sha1:39489babe20c42c16ea8f11457de423b2bcca009
    SOURCE3_VFY=sha1:5532084c54a79f77807ee8ae3cb09018b3e74c12
    SOURCE4_VFY=sha1:401b3ada4f9a2a60cd0f6ac60f7107f1fdca0638
    SOURCE5_VFY=sha1:d0e58c3e073d02a66e2fcb7eab322f1b224223dc
    SOURCE6_VFY=sha1:3a24d608b86bcf8155ef67a403c2bc831a0f9f52
+      WEB_SITE=http://www.openafs.org/
        ENTERED=20031216
-       UPDATED=20071103
+       UPDATED=20071227
     MAINTAINER="ratler at lunar-linux.org"
          SHORT="A distributed filesystem"
 PSAFE=no
diff --git a/filesys/openafs/init.d/afs b/filesys/openafs/init.d/afs
index 5541e2a..bea3c43 100644
--- a/filesys/openafs/init.d/afs
+++ b/filesys/openafs/init.d/afs
@@ -15,9 +15,9 @@ RESULT_WARN="${ESC}[\061;33m${ESC}[70G[\040\040WARN\040\040]${ESC}[m"
 
 
 runcmd () {
-    echo -n "$1 "
-    shift
-    $* && echo -e $RESULT_OK || echo -e $RESULT_FAIL
+  echo -n "$1 "
+  shift
+  $* && echo -e $RESULT_OK || echo -e $RESULT_FAIL
 }
 
 
@@ -25,7 +25,7 @@ SYSCNF=/etc/config.d/afs
 
 # Gather up options and post startup script name, if present
 if [ -f $SYSCNF ] ; then
-    . $SYSCNF
+  . $SYSCNF
 fi
 
 CACHEINFO=${CACHEINFO:-/etc/openafs/cacheinfo}
@@ -34,118 +34,123 @@ AFS=${AFSDIR:-/afs}
 
 # is_on returns 1 if value of arg is "on"
 is_on () {
-    if  test "$1" = "on" ; then return 0
-    else return 1
-    fi
+  if  test "$1" = "on" ; then
+    return 0
+  else
+    return 1
+  fi
 }
 
 on_network() {
-    ADDRS=`LANG=C ifconfig -a | grep 'inet addr' | grep -v 127.0.0.1 | wc -l`
-    if [ "$ADDRS" = "" ]; then
+  ADDRS=`LANG=C ifconfig -a | grep 'inet addr' | grep -v 127.0.0.1 | wc -l`
+  if [ "$ADDRS" = "" ]; then
 	echo afs: No interfaces with IP address 1>&2
 	return 1
-    elif [ $ADDRS = 0 ]; then
+  elif [ $ADDRS = 0 ]; then
 	echo afs: No interfaces with IP address 1>&2
 	return 1
-    fi
-    return 0
+  fi
+  return 0
 }
 
 choose_afsdoptions () {
-    if [ -z "$OPTIONS" -o "$OPTIONS" = "AUTOMATIC" ]; then
+  if [ -z "$OPTIONS" -o "$OPTIONS" = "AUTOMATIC" ]; then
 	if [ $CACHESIZE -lt 131072 ]; then
-	    OPTIONS=$SMALL
+	  OPTIONS=$SMALL
 	elif [ $CACHESIZE -lt 524288 ]; then
-	    OPTIONS=$MEDIUM
+	  OPTIONS=$MEDIUM
 	elif [ $CACHESIZE -lt 1048576 ]; then
-	    OPTIONS=$LARGE
+	  OPTIONS=$LARGE
 	elif [ $CACHESIZE -lt 2097152 ]; then
-	    OPTIONS=$XLARGE
+	  OPTIONS=$XLARGE
 	else
-	    OPTIONS=$XXLARGE
+	  OPTIONS=$XXLARGE
 	fi
-    fi
-    AFSD_OPTIONS="$OPTIONS $VERBOSE"
-    if is_on $ENABLE_AFSDB; then
+  fi
+  AFSD_OPTIONS="$OPTIONS $VERBOSE"
+  if is_on $ENABLE_AFSDB; then
 	AFSD_OPTIONS="$AFSD_OPTIONS -afsdb"
-    fi
-    if is_on $ENABLE_DYNROOT; then
+  fi
+  if is_on $ENABLE_DYNROOT; then
 	AFSD_OPTIONS="$AFSD_OPTIONS -dynroot"
-    fi
+  fi
 }
 
 start ()
 {
-    # Check network or die
-    on_network || exit 1
-    
-    # Load kernel extensions
-    if ! modprobe libafs ; then 
+  # Check network or die
+  on_network || is_on $ENABLE_DYNROOT || exit 1
+
+  # Load kernel extensions
+  if ! modprobe libafs ; then
 	echo Failed to load AFS kernel module, not starting AFS services.
 	exit 1
-    fi
-    
-    # Start bosserver, it if exists
-    if is_on $AFS_SERVER && test -x /usr/sbin/bosserver  ; then
+  fi
+
+  # Start bosserver, it if exists
+  if is_on $AFS_SERVER && test -x /usr/sbin/bosserver  ; then
 	echo -n "Starting AFS server: "
 	/usr/sbin/bosserver -nofork ${BOSSERVER_OPTIONS} &
 	echo -e $RESULT_OK || echo -e $RESULT_FAIL
 	if is_on $WAIT_FOR_SALVAGE; then
-            # wait for fileserver to finish salvaging
-	    sleep 10
-	    while /usr/bin/bos status localhost fs 2>&1 | grep 'Auxiliary.*salvaging'; do
+      # wait for fileserver to finish salvaging
+	  sleep 10
+	  while /usr/bin/bos status localhost fs 2>&1 | grep 'Auxiliary.*salvaging'; do
 		echo "Waiting for salvager to finish..... "
 		sleep 10
-	    done
+	  done
 	fi
-    fi
-    
-    # Start AFS client
-    if is_on $AFS_CLIENT && test -x /usr/sbin/afsd  ; then
+  fi
+
+  # Start AFS client
+  if is_on $AFS_CLIENT && test -x /usr/sbin/afsd  ; then
 	echo -n "Starting AFS client: "
 	choose_afsdoptions
 	/usr/sbin/afsd ${AFSD_OPTIONS} &&
 	echo -e $RESULT_OK || echo -e $RESULT_FAIL
 	$AFS_POST_INIT
-    fi
+  fi
 }
 
 stop ()
 {
-    if is_on $AFS_CLIENT  ; then
+  if is_on $AFS_CLIENT  ; then
 	if [ -x /usr/sbin/killafs ] ; then
-	    runcmd "Sending all processes using /afs the TERM signal ..." /usr/sbin/killafs TERM
-	    runcmd "Sending all processes using /afs the KILL signal ..." /usr/sbin/killafs KILL
+	  runcmd "Sending all processes using /afs the TERM signal ..." /usr/sbin/killafs TERM
+	  runcmd "Sending all processes using /afs the KILL signal ..." /usr/sbin/killafs KILL
 	fi
 	echo -n "Stopping AFS client: "
 	umount /afs
 	echo -e $RESULT_OK || echo -e $RESULT_FAIL
-    fi
-    
-    if is_on $AFS_SERVER && test -x /usr/bin/bos ; then
+  fi
+
+  if is_on $AFS_SERVER && test -x /usr/bin/bos ; then
 	echo -n "Stopping AFS server: "
 	/usr/bin/bos shutdown localhost -localauth -wait &&
 	echo -e $RESULT_OK || echo -e $RESULT_FAIL
 	killall -HUP bosserver
-	
-    fi
-    echo -n "Unloading AFS kernel module: "
-    modprobe -r libafs &&
-    echo -e $RESULT_OK || echo -e $RESULT_FAIL
-    
-    rm -f /var/lock/subsys/afs
+
+  fi
+  echo -n "Unloading AFS kernel module: "
+  modprobe -r libafs &&
+  echo -e $RESULT_OK || echo -e $RESULT_FAIL
+
+  rm -f /var/lock/subsys/afs
 }
 
 restart ()
 {
-        # Restart AFS
-	$0 stop
-	$0 start
+  # Restart AFS
+  $0 stop
+  $0 start
 }
 
 case "$1" in
-	start|stop|restart)
+  start|stop|restart)
 	$1
 	;;
-	*)	echo "Usage: $0 {start|stop|restart}"; exit 1 ;;
+  *)
+    echo "Usage: $0 {start|stop|restart}";
+    exit 1
+    ;;
 esac
diff --git a/kernel/openafs-driver/DETAILS b/kernel/openafs-driver/DETAILS
index fa67cf3..e63b08f 100644
--- a/kernel/openafs-driver/DETAILS
+++ b/kernel/openafs-driver/DETAILS
@@ -1,12 +1,12 @@
           MODULE=openafs-driver
-         VERSION=1.4.5
+         VERSION=1.4.6
           SOURCE=openafs-$VERSION-src.tar.bz2
 SOURCE_DIRECTORY=$BUILD_DIRECTORY/openafs-$VERSION
       SOURCE_URL=http://www.openafs.org/dl/openafs/$VERSION/
+      SOURCE_VFY=sha1:39489babe20c42c16ea8f11457de423b2bcca009
         WEB_SITE=http://www.openafs.org/
-      SOURCE_VFY=sha1:b9c8aaab204487e82ac8de261a2088e4eb145297
          ENTERED=20031216
-         UPDATED=20071103
+         UPDATED=20071227
       MAINTAINER="ratler at lunar-linux.org"
            SHORT="OpenAFS kernel module"
 PROFILE="yes"


More information about the Lunar-commits mailing list