diff options
author | rsb <none@none> | 2006-11-03 07:59:36 -0800 |
---|---|---|
committer | rsb <none@none> | 2006-11-03 07:59:36 -0800 |
commit | 60a3f738d56f92ae8b80e4b62a2331c6e1f2311f (patch) | |
tree | 2019d25daaa419d29020d1eeb3f3043ec80656b2 /usr/src/ucbcmd | |
parent | 8810c16b934a2ad4f27aa86f95b0e8cec1c6ea46 (diff) | |
download | illumos-gate-60a3f738d56f92ae8b80e4b62a2331c6e1f2311f.tar.gz |
4838106 /usr/ucb/df -i -t nfs fails strangely
Contributed by Peter Tribble (peter.tribble@gmail.com)
Diffstat (limited to 'usr/src/ucbcmd')
-rw-r--r-- | usr/src/ucbcmd/df/df.sh | 45 |
1 files changed, 20 insertions, 25 deletions
diff --git a/usr/src/ucbcmd/df/df.sh b/usr/src/ucbcmd/df/df.sh index 82a57fdffe..8263f4eaee 100644 --- a/usr/src/ucbcmd/df/df.sh +++ b/usr/src/ucbcmd/df/df.sh @@ -3,9 +3,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -23,31 +22,27 @@ # # ident "%Z%%M% %I% %E% SMI" # -# Copyright (c) 1991 by Sun Microsystems, Inc. -# +# Copyright 2006 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. # # Replace /usr/ucb/df # ARG=-k -count=1 -num=$# - -if [ $# -lt 1 ] -then - /usr/sbin/df $ARG - exit $? -fi - -while [ "$count" -le "$num" ] +FSSPEC=N +INODES=N + +while [ $# -gt 0 ] do flag=$1 case $flag in - '-a') - ARG="$ARG -a" + '-F') + ARG="$ARG -F" + FSSPEC=Y ;; '-t') ARG="$ARG -F" + FSSPEC=Y shift if [ "$1" = "4.2" ] then @@ -55,20 +50,20 @@ do else ARG="$ARG $1" fi - count=`expr $count + 1` ;; '-i') - ARG="$ARG -F ufs -o i" + ARG="$ARG -o i" + INODES=Y ;; *) ARG="$ARG $flag" - ;; + ;; esac - if [ "$count" -lt "$num" ] - then + if [ $# -gt 0 ]; then shift fi - count=`expr $count + 1` done -/usr/sbin/df $ARG -exit $? +if [ "$INODES" = "Y" ] && [ "$FSSPEC" = "N" ]; then + ARG="-F ufs $ARG" +fi +exec /usr/sbin/df $ARG |