Annotation of embedaddon/rsync/testsuite/chmod-temp-dir.test, revision 1.1

1.1     ! misho       1: #! /bin/sh
        !             2: 
        !             3: # Copyright (C) 2004 by Wayne Davison <wayned@samba.org>
        !             4: 
        !             5: # This program is distributable under the terms of the GNU GPL (see
        !             6: # COPYING).
        !             7: 
        !             8: # Test that various read-only and set[ug]id permissions work properly,
        !             9: # even when using a --temp-dir option (which we try to point at a
        !            10: # different filesystem than the destination dir).
        !            11: 
        !            12: . "$suitedir/rsync.fns"
        !            13: 
        !            14: hands_setup
        !            15: 
        !            16: tmpdir2=$RSYNC_TEST_TMP
        !            17: if [ x"$tmpdir2" = x ]; then
        !            18:     tmpdir2=/tmp
        !            19: fi
        !            20: sdev=`$TOOLDIR/getfsdev $scratchdir`
        !            21: tdev=`$TOOLDIR/getfsdev $tmpdir2`
        !            22: if [ x$sdev = x$tdev ]; then
        !            23:     tmpdir2=/var/tmp
        !            24:     if [ -d $tmpdir2 ]; then
        !            25:        tdev=`$TOOLDIR/getfsdev $tmpdir2`
        !            26:     else
        !            27:        tdev="$sdev"
        !            28:     fi
        !            29:     [ x$sdev = x$tdev ] && test_skipped "Can't find a tmp dir on a different file system"
        !            30: fi
        !            31: 
        !            32: chmod 440 "$fromdir/text"
        !            33: chmod 500 "$fromdir/dir/text"
        !            34: e="$fromdir/dir/subdir/foobar.baz"
        !            35: chmod 6450 "$e" || chmod 2450 "$e" || chmod 1450 "$e" || chmod 450 "$e"
        !            36: e="$fromdir/dir/subdir/subsubdir/etc-ltr-list"
        !            37: chmod 2670 "$e" || chmod 1670 "$e" || chmod 670 "$e"
        !            38: 
        !            39: # First a normal copy.
        !            40: runtest "normal copy" 'checkit "$RSYNC -avv --temp-dir=\"$tmpdir2\" \"$fromdir/\" \"$todir\"" "$fromdir" "$todir"'
        !            41: 
        !            42: # Then we update all the files.
        !            43: runtest "update copy" 'checkit "$RSYNC -avvI --no-whole-file --temp-dir=\"$tmpdir2\" \"$fromdir/\" \"$todir\"" "$fromdir" "$todir"'
        !            44: 
        !            45: # The script would have aborted on error, so getting here means we've won.
        !            46: exit 0

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>