added dd function to handle variations of dd output in Linux
authorAllan Randall <allanr@sgi.com>
Mon, 15 May 2006 06:10:31 +0000 (06:10 +0000)
committerAllan Randall <allanr@sgi.com>
Mon, 15 May 2006 06:10:31 +0000 (06:10 +0000)
Merge of master-melb:xfs-cmds:25929a by kenmcd.

  added dd function to handle variations of dd output in Linux

common.rc

index 971c676c0e7f8e3288449e987b51ec962835be58..83e1e17feaacecb2d7ee0831e9cb05a9181406ae 100644 (file)
--- a/common.rc
+++ b/common.rc
 #  Mountain View, CA 94043, USA, or: http://www.sgi.com
 #-----------------------------------------------------------------------
 
+dd()
+{
+   if [ "$HOSTOS" == "Linux" ]
+   then        
+       command dd --help | grep noxfer > /dev/null 2>&1
+       
+       if [ "$?" -eq 0 ]
+           then
+               command dd status=noxfer $@
+           else
+               command dd $@
+       fi
+   else
+       command dd $@
+   fi
+}
+
 _mount_opts()
 {
     case $FSTYP in