~gandelman-a/ubuntu/oneiric/cobbler/lp850892

« back to all changes in this revision

Viewing changes to debian/cobbler-ubuntu-import

  • Committer: Adam Gandelman
  • Date: 2011-09-16 05:10:52 UTC
  • Revision ID: adamg@canonical.com-20110916051052-3jsflb99whn735ic
Whitepace cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
90
90
        { [ -d "$ISO_DIR" ] || mkdir -p "$ISO_DIR"; }  || fail "failed to create $ISO_DIR"
91
91
fi
92
92
mkdir "$TEMP_D/mnt" || fail "failed to make tempdir/mnt"
93
 
    
 
93
 
94
94
for tok in "$@"; do
95
95
        rel=${tok%-*}; arch=${tok#*-}
96
96
        [ "$arch" = "amd64" ] && 
111
111
                exit 0
112
112
        fi
113
113
        if $check_update; then
114
 
                # compare md5 of the local iso to whats on the mirror. 
 
114
                # compare md5 of the local iso to whats on the mirror.
115
115
                [ ! -f "$ISO_DIR/$iso" ] && exit 0
116
116
                md5=$mirror/dists/$rel/main/installer-$ubuntu_arch/current/images/MD5SUMS
117
 
                md5sum_local=$(md5sum "$ISO_DIR/$iso") && md5sum_local=${md5sum_local% *} \
118
 
                        && [ -n $md5sum_local ] || fail "failed to checksum $ISO_DIR/$iso"
 
117
                md5sum_local=$(md5sum "$ISO_DIR/$iso") && md5sum_local=${md5sum_local% *} \
 
118
                        && [ -n $md5sum_local ] || fail "failed to checksum $ISO_DIR/$iso"
119
119
                wget -qO $TEMP_D/MD5SUMS $md5 || fail "failed to download MD5SUMS for $rel-$arch: $u"
120
 
                md5sum_remote=$(awk '$2 == "./netboot/mini.iso" { print $1 }' $TEMP_D/MD5SUMS) &&
121
 
                        [ -n $md5sum_remote ] || fail "failed to parse checksum from $TEMP_D/MD5SUM"
 
120
                md5sum_remote=$(awk '$2 == "./netboot/mini.iso" { print $1 }' $TEMP_D/MD5SUMS) &&
 
121
                        [ -n $md5sum_remote ] || fail "failed to parse checksum from $TEMP_D/MD5SUM"
122
122
                [ $md5sum_local != $md5sum_remote ] && exit 0
123
123
                error "$ISO_DIR/$iso up to date." && exit 3
124
124
        fi