source: soft/build_system/build_system/upload/robot/trunk/rsync_old_ken_other @ 1

Last change on this file since 1 was 1, checked in by fasma, 13 years ago

Initial Import from Mandriva's soft revision 224062 and package revision 45733

File size: 1.9 KB
Line 
1#!/bin/sh
2
3
4LOCK=/home/mandrake/tmp/rsync_old_ken
5
6if [ -e $LOCK ]; then
7    pid=`cat $LOCK`
8    if [ $pid -gt 0 ]; then
9        kill -0 $pid > /dev/null 2>&1
10        if [ $? != 0 ]; then
11            echo "stale lock: removing it"
12            rm -f "$LOCK"
13        else
14            echo "$0 is already running (pid $pid)"
15            exit
16        fi
17    fi
18fi
19
20echo $$ > $LOCK
21
22for machine in raoh old_ken; do
23        echo Mirroring to $machine
24
25#ping -c 1 -i 30 $machine > /dev/null
26#
27#if [ $? != 0 ]; then
28#    if [ -n "$*" ]; then
29#       echo "$machine is down"
30#    fi
31#    exit 0
32#fi
33
34VERSION=2006.0
35#RSYNC="rsync -vlHarP --delete"
36RSYNC="rsync -vlHarP --delete"
37
38port=22
39if [[ $machine == old_ken ]]; then
40        port=222
41else
42        $RSYNC -e "ssh -p $port -x -c arcfour" /home/qa/ $machine:/home/qa/
43        $RSYNC -e "ssh -p $port -x -c arcfour" /home/mandrake/ $machine:/home/mandrake/
44        $RSYNC -e "ssh -p $port -x -c arcfour" /mnt/BIG/dis/old $machine:/mnt/BIG/dis/
45        $RSYNC -e "ssh -p $port -x -c arcfour" /mnt/BIG/dis/rejected $machine:/mnt/BIG/dis/
46fi
47
48
49# distro
50$RSYNC -e "ssh -p $port -x -c arcfour" /mnt/BIG/dis/$VERSION $machine:/mnt/BIG/dis/
51$RSYNC -e "ssh -p $port -x -c arcfour" /mnt/BIG/dis/corporate $machine:/mnt/BIG/dis/
52
53# ISO
54$RSYNC -e "ssh -p $port -x -c arcfour" /mnt/BIG/dis/iso/$VERSION $machine:/mnt/BIG/dis/iso/
55$RSYNC -e "ssh -p $port -x -c arcfour" /mnt/BIG/dis/iso/corporate/ $machine:/mnt/BIG/dis/iso/corporate/
56
57# updates
58$RSYNC -e "ssh -p $port -x -c arcfour" /mnt/BIG/dis/updates_old $machine:/mnt/BIG/dis/
59$RSYNC -e "ssh -p $port -x -c arcfour" /mnt/BIG/dis/testing $machine:/mnt/BIG/dis/
60$RSYNC -e "ssh -p $port -x -c arcfour" /mnt/BIG/dis/testing_old $machine:/mnt/BIG/dis/
61
62# cdcom
63$RSYNC -e "ssh -p $port -x -c arcfour" /mnt/BIG/dis/cdcom $machine:/mnt/BIG/dis/
64
65# svn
66$RSYNC -e "ssh -p $port -x -c arcfour" /mnt/BIG/svn $machine:/mnt/BIG/
67# cvs
68$RSYNC -e "ssh -p $port -x -c arcfour" /mnt/BIG/cvs $machine:/mnt/BIG/
69
70echo Mirroring to $machine done
71done
72
73rm $LOCK
Note: See TracBrowser for help on using the repository browser.