ubuntuusers.de

Titel:
distmirror
Datum:
30. Dezember 2009 02:42
Aktionen:
Code:
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/bin/bash
 
# change path to your real mirror directory
MIRROR_PATH="$(dirname $0)/ubuntu"
 
# we choose the german mirror :)
MIRROR_HOST="archive.ubuntu.com"
HOST_ROOT="ubuntu"

# choose your arch (i368,amd64,...]
ARCH="i368"

# change the version here
DIST="jaunty"
 
# repositories to mirror
SECTION="multiverse,universe,restricted,main"
 
# other options
OPTIONS="--passive --progress --nocleanup --nosource --ignore-release-gpg"
OPTIONS2="--cleanup"
 
case "$1" in
    
 
distmirror)
 
    logger -t mirror-ubuntu.bash[$$] Updating Ubuntu-$1;
    debmirror "$MIRROR_PATH" --host=$MIRROR_HOST --root=$HOST_ROOT --dist=$DIST
--section=$SECTION --arch=$ARCH $OPTIONS;
    logger -t mirror-ubuntu.bash[$$] Updating Ubuntu-$1;
    exit;;
 
security)
    logger -t mirror-ubuntu.bash[$$] Updating Ubuntu-$1;
    debmirror "$MIRROR_PATH" --host=$MIRROR_HOST --root=$HOST_ROOT
--dist=$DIST-security --section=$SECTION --arch=$ARCH $OPTIONS;
    logger -t mirror-ubuntu.bash[$$] Updating Ubuntu-$1;
    exit;;
 
 
backports)
    logger -t mirror-ubuntu.bash[$$] Updating Ubuntu-$1;
    debmirror "$MIRROR_PATH" --host=$MIRROR_HOST --root=$HOST_ROOT
--dist=$DIST-backports --section=$SECTION --arch=$ARCH $OPTIONS;
    logger -t mirror-ubuntu.bash[$$] Updating Ubuntu-$1;
    exit;;
 
 
updates)
    logger -t mirror-ubuntu.bash[$$] Updating Ubuntu-$1;
    debmirror "$MIRROR_PATH" --host=$MIRROR_HOST --root=$HOST_ROOT
--dist=$DIST-updates --section=$SECTION --arch=$ARCH $OPTIONS;
    logger -t mirror-ubuntu.bash[$$] Updating Ubuntu-$1;
    exit;;
 
all)
 
    logger -t mirror-ubuntu.bash[$$] Updating Ubuntu-$1;
    debmirror "$MIRROR_PATH" --host=$MIRROR_HOST --root=$HOST_ROOT --dist=$DIST
--section=$SECTION --arch=$ARCH $OPTIONS;
    debmirror "$MIRROR_PATH" --host=$MIRROR_HOST --root=$HOST_ROOT
--dist=$DIST-security --section=$SECTION --arch=$ARCH $OPTIONS;
    debmirror "$MIRROR_PATH" --host=$MIRROR_HOST --root=$HOST_ROOT
--dist=$DIST-backports --section=$SECTION --arch=$ARCH $OPTIONS;
    debmirror "$MIRROR_PATH" --host=$MIRROR_HOST --root=$HOST_ROOT
--dist=$DIST-updates --section=$SECTION --arch=$ARCH $OPTIONS;
    logger -t mirror-ubuntu.bash[$$] Updating Ubuntu-$1;
    exit;;
    
    
esac
 
echo "Falscher Parameter"
echo "Parameter: distmirror, security, backports, updates, all"
exit