Test suite: fix test file permissions in complex/44_failover_nfs_oneway.sh.
authorMartin Schwenke <martin@meltin.net>
Thu, 30 Jul 2009 00:47:36 +0000 (10:47 +1000)
committerMartin Schwenke <martin@meltin.net>
Thu, 30 Jul 2009 00:47:36 +0000 (10:47 +1000)
Something, perhaps root_squash, causing permission denied on the test
file after we copy it over with scp.  This sets the initial
permissions to be friendly and adds -p to the scp command to maintain
those friendly permissions.

Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit 52f21f5a92eb14df7540a2ae9e212d936e646c06)

ctdb/tests/complex/44_failover_nfs_oneway.sh

index 77503d44abd593ff82dbc7bdbba57e6adb80b705..258670bba37162d1317dfb6a9a9591eb72a2fe29 100755 (executable)
@@ -66,10 +66,11 @@ ctdb_test_exit_hook_add rmdir "$mnt_d"
 
 echo "Create file containing random data..."
 dd if=/dev/urandom of=$local_f bs=1k count=1
+chmod 644 "$local_f" # needed for *_squash?
 local_sum=$(sum $local_f)
 [ $? -eq 0 ]
 
-scp "$local_f" "$remote_f"
+scp -p "$local_f" "$remote_f"
 
 echo "Mounting ${test_ip}:${first_export} on ${mnt_d} ..."
 mount -o timeo=1,hard,intr,vers=3 ${test_ip}:${first_export} ${mnt_d}