Be more Solaris-friendly.
Submitted by: Milan Cermak <Milan.Cermak@Sun.COM>
This commit is contained in:
parent
af65d772a0
commit
092513dad4
@ -6,15 +6,19 @@ os=`uname`
|
||||
|
||||
case "${os}" in
|
||||
FreeBSD|Darwin)
|
||||
GREP=grep
|
||||
#fs=`df -T . | tail -1 | awk '{print $2}'`
|
||||
pattern="`df . | tail -1 | awk '{printf("%s on %s \n", $1, $6)}'`"
|
||||
fs=`mount | egrep "^${pattern}" | awk -F '[(,]' '{print $2}'`
|
||||
;;
|
||||
Solaris)
|
||||
pattern="`df -k . | tail -1 | awk '{printf("%s on %s \n", $1, $6)}'`"
|
||||
fs=`mount -v | egrep "^${pattern}" | awk '{print $5}'`
|
||||
Solaris|SunOS)
|
||||
GREP=ggrep
|
||||
pattern=`df -k . | tail -1 | awk '{printf("%s on %s \n", $1, $6)}'`
|
||||
fs=`mount -v | egrep "^${pattern}" | awk '{print $5}' | \
|
||||
tr -s '[:lower:]' '[:upper:]'`
|
||||
;;
|
||||
Linux)
|
||||
GREP=grep
|
||||
fs=`df -PT . | tail -1 | awk '{print $2}'`
|
||||
;;
|
||||
*)
|
||||
|
@ -87,7 +87,7 @@ test_check()
|
||||
|
||||
todo()
|
||||
{
|
||||
echo "${os}" | grep -iq "${1}"
|
||||
echo "${os}" | $GREP -iq "${1}"
|
||||
if [ $? -eq 0 ]; then
|
||||
todomsg="${2}"
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user