Fix detection of installed fuse in init script
authorMiklos Szeredi <miklos@szeredi.hu>
Mon, 26 Feb 2007 13:51:35 +0000 (13:51 +0000)
committerMiklos Szeredi <miklos@szeredi.hu>
Mon, 26 Feb 2007 13:51:35 +0000 (13:51 +0000)
ChangeLog
util/init_script
util/mount.fuse

index 9c03e882ee2b6c8de41e7798236773456615f34a..b9b254c5dd89247a519cb2a1b0db681b43d4fee3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-02-26  Miklos Szeredi <miklos@szeredi.hu>
+
+       * Fix detection of installed fuse in init script.  Reported and
+       fix suggested by Davide Canova
+
 2007-02-05  Miklos Szeredi <miklos@szeredi.hu>
 
        * Fix 2.6.9 RHEL kernels, which have compatibility mutex.h, but
index ed964cbc7fb6e99c6262ca9488f55b3f47123067..0ca395f9c583bffadee658c880d203d2de0735c5 100755 (executable)
@@ -12,7 +12,7 @@ DESC="FUSE"
 MOUNTPOINT=/sys/fs/fuse/connections
 
 # Gracefully exit if the package has been removed.
-test -x `which fusermount` || exit 0
+which fusermount &>/dev/null || exit 0
 
 error()
 {
index 900849243abbe2833f8a83bbd4b2dba0251a7c1e..98e0ba77037542d80ea2dbcf93a71fffb4a8606e 100644 (file)
@@ -48,8 +48,8 @@ shift
 # loop over each mount option and skip all that should be ignored
 IFS=","
 for OPT in $@; do
-       OPT=`echo $OPT | sed "s/^\(-o\|user\|nouser\|users\|auto\|noauto\|_netdev\)$/ignore/"`
-       if [ "$OPT" == "ignore" ]; then continue; fi
+       OPT=`echo $OPT | sed "s/^\(-o\|user\|nouser\|users\|auto\|noauto\|_netdev\)$/IGNORE/"`
+       if [ "$OPT" == "IGNORE" ]; then continue; fi
        OPTIONS="$OPTIONS$OPT,"
 done
 IFS=" "