Test remote dumping with a user specified as well.
[xfstests-dev.git] / common.dump
index 66c12950e675cb977c780968e97eeab782567046..a0fa43ce1859059d8447b944773efe342d9afb13 100644 (file)
@@ -87,9 +87,17 @@ _mt()
     op=$1
     if _isrmt; then  
        # REMOTE
-       _rmthost=`echo $dumptape | awk -F: '{print $1}'`
        _rmtdev=`echo $dumptape | awk -F: '{print $2}'`
-       rsh -n $_rmthost "mt -t $_rmtdev $op"
+
+        if echo $dumptape | grep '@' >/dev/null; then
+           _spec=`echo $dumptape | awk -F: '{print $1}'`
+           _rmtuser=`echo $_spec | awk -F@ '{print $1}'`
+           _rmthost=`echo $_spec | awk -F@ '{print $2}'`
+           rsh -n -l $_rmtuser $_rmthost "mt -t $_rmtdev $op"
+       else
+           _rmthost=`echo $dumptape | awk -F: '{print $1}'`
+           rsh -n $_rmthost "mt -t $_rmtdev $op"
+       fi
     else
        #LOCAL
        mt -t $dumptape $op