source: soft/build_system/build_system/upload/robot/trunk/update-rsync @ 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.1 KB
Line 
1#!/bin/sh
2
3LOCK_ken=/mnt/BIG/distrib/.update_from_ken
4LOCK=/mnt/BIG/distrib/.update_in_progress
5# check lock created by the admin script to be sure
6# to have a clean tree.
7
8if [ -e "$LOCK_ken" ]; then
9        echo "Update from ken running, exiting"
10        exit
11fi
12if [ -e "$LOCK" ]; then
13    pid=`cat $LOCK`
14    if [ "$pid" -gt 0 ]; then
15        if [ ! -d /proc/$pid ]; then
16            echo "stale lock: removing it"
17            rm -f "$LOCK"
18        else
19            while [ -d /proc/$pid ]; do
20                if [ -n "$*" ]; then
21                    echo "exiting because $pid is already running"
22                fi
23                exit
24            done
25        fi
26    fi
27fi
28echo "$$" > $LOCK
29trap "rm -f $LOCK" 0
30
31
32#rsync --bwlimit=80 -az -e ssh --delete "$@" kenobi:/mnt/BIG/distrib/updates/  /mnt/BIG/distrib/updates/ && rsync -avuz -e ssh --delete "$@" /mnt/BIG/distrib/updates/ rsync.mandriva.com:/Disk2/mirror/pub/official/updates/
33rsync -avuz -e ssh --delete "$@" /mnt/BIG/distrib/updates/ rsync.mandriva.com:mirror/MandrivaLinux/official/updates/
34ssh rsync.mandriva.com "find /home/mandrake/mirror/MandrivaLinux/official/updates/ -type d -exec chmod 755 {} \;"
35
36# rsync --bwlimit=80 -az --delete --port 20026 "$@" /mnt/BIG/distrib/updates/mnf8.2 ftp.mnf::MNF/updates/
37
38rm -f $LOCK
Note: See TracBrowser for help on using the repository browser.