]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Relax the test for the `local'ness of a file system,
authorJim Meyering <jim@meyering.net>
Fri, 14 Mar 2003 07:56:09 +0000 (07:56 +0000)
committerJim Meyering <jim@meyering.net>
Fri, 14 Mar 2003 07:56:09 +0000 (07:56 +0000)
so that now it works also for tmpfs.

tests/du/slink

index fd09613d954c63e738334fe66d8649635e26af02..7469b91387e1289c55f8529ab537d12d9495e571 100755 (executable)
@@ -17,9 +17,9 @@ cd $tmp || framework_failure=1
 
 # Determine if `.' is on a local (would non-NFS be sufficient?) file system.
 # On at least some NFS implementations, symlinks never take up space,
-df --local . > tmp
+df --local . | tail -n +2 > tmp
 # So if this is a non-local file system, skip the test.
-if grep '^/' tmp > /dev/null; then
+if test -s tmp; then
   : # Ok.
 else
   echo "$0: skipping this test, since \`.' is on a non-local file system" 1>&2