[OpenAFS] small improvement for Linux rc script

Tino Schwarze tino.schwarze@informatik.tu-chemnitz.de
Wed, 26 Jun 2002 15:09:38 +0200


--24zk1gE8NUlDmwG9
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Wed, Jun 26, 2002 at 09:54:29AM -0400, Derek Atkins wrote:

> Changing the message and dying is fine...  I just want to make
> sure you're not just continuing :)

Hm. Okay, I modified the patch accordingly.

Bye, Tino.

-- 
             * LINUX - Where do you want to be tomorrow? *
                  http://www.tu-chemnitz.de/linux/tag/

--24zk1gE8NUlDmwG9
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="openafs-1.2.5-rc-improvement.patch"

--- openafs-1.2.5/src/afsd/afs.rc.linux.org	Wed Jun 26 14:11:47 2002
+++ openafs-1.2.5/src/afsd/afs.rc.linux	Wed Jun 26 16:08:18 2002
@@ -200,9 +200,15 @@
 		exit 1
 	fi
 
-	# use the prefix command if required
-	set_prefix
-	/sbin/insmod ${PREFIX:+-P $PREFIX} -f -m $MODLOADDIR/$LIBAFS > $MODLOADDIR/libafs.map 2>&1
+	if grep '^libafs-' /proc/modules > /dev/null ; then
+		echo "An AFS module is already loaded. Make sure that it is not left over from an"
+        echo "unclean afsd shutdown, remove it and try again."
+        return 1
+	else
+		# use the prefix command if required
+		set_prefix
+		/sbin/insmod ${PREFIX:+-P $PREFIX} -f -m $MODLOADDIR/$LIBAFS > $MODLOADDIR/libafs.map 2>&1
+	fi
 }
 
 generate_cacheinfo() {

--24zk1gE8NUlDmwG9--