Remove root 'ls' after mount workaround
authorAlexey Shvetsov <alexxy@gentoo.org>
Thu, 12 May 2011 21:54:03 +0000 (14:54 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 12 May 2011 22:01:35 +0000 (15:01 -0700)
This workaround was introduced to workaround issue #164.  This
issue was fixed by commit 5f35b19 so the workaround can be safely
dropped from both the zfs.fedora and zfs.gentoo init scripts.

etc/init.d/zfs.fedora
etc/init.d/zfs.gentoo

index 8e48efb..69df621 100644 (file)
@@ -155,15 +155,6 @@ start()
        
        action $"Mounting ZFS filesystems not yet mounted: " $ZFS mount -a || return 152
 
-       # hack to read mounted file systems because otherwise
-       # zfs returns EPERM when a non-root user reads a mounted filesystem before root did
-       savepwd="$PWD"
-       mount | grep " type zfs " | sed 's/.*on //' | sed 's/ type zfs.*$//' | while read line ; do
-               cd "$line" > /dev/null 2>&1
-               ls > /dev/null
-       done
-       cd "$savepwd"
-
        read_mtab  "^/dev/zd"
        read_fstab "^/dev/zd"
 
index 1d8ece2..c9c5d85 100644 (file)
@@ -75,17 +75,6 @@ start() {
                return $rv
        fi
 
-       # hack to read mounted file systems because otherwise
-       # zfs returns EPERM when a non-root user reads a mounted filesystem before root did
-       savepwd="$PWD"
-       mount | grep " type zfs " | sed 's/.*on //' | sed 's/ type zfs.*$//' | \
-       while read line
-       do
-               cd "$line" &> /dev/null
-               ls &> /dev/null
-       done
-       cd "$savepwd"
-
        eend 0
        return 0
 }