Merge lp:~gandelman-a/ubuntu/precise/cobbler/cobbler-ubuntu-import-proxy into lp:ubuntu/precise/cobbler

Proposed by Adam Gandelman
Status: Approved
Approved by: St├ęphane Graber
Approved revision: 55
Proposed branch: lp:~gandelman-a/ubuntu/precise/cobbler/cobbler-ubuntu-import-proxy
Merge into: lp:ubuntu/precise/cobbler
Diff against target: 59 lines (+17/-2)
2 files modified
debian/changelog (+8/-0)
debian/cobbler-ubuntu-import (+9/-2)
To merge this branch: bzr merge lp:~gandelman-a/ubuntu/precise/cobbler/cobbler-ubuntu-import-proxy
Reviewer Review Type Date Requested Status
Andres Rodriguez Approve
Ubuntu branches Pending
Review via email: mp+82763@code.launchpad.net

Description of the change

Two minor changes to cobbler-ubuntu-import:

- There is a faulty if clause when determining whether or not to test+create the $ISO_DIR if its missing, which causes the script to later fail if for whatever reason the directory is not there.

- Adds a -p argument for specifying a proxy, which is passed to wget via http_proxy environment variable. orchestra-import-isos will be able to make use of this.

To post a comment you must log in.
55. By Adam Gandelman on 2011-11-19

Update debian/changelog.

Andres Rodriguez (andreserl) wrote :

Looks good. Uploading

review: Approve

Unmerged revisions

55. By Adam Gandelman on 2011-11-19

Update debian/changelog.

54. By Adam Gandelman on 2011-11-19

debian/cobbler-ubuntu-import: Support wget'ing via a proxy via -p argument. Correct error so that $ISO_DIR actually gets created if it doesn't exist

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2011-11-17 20:40:30 +0000
3+++ debian/changelog 2011-11-19 01:41:24 +0000
4@@ -1,3 +1,11 @@
5+cobbler (2.2.2-0ubuntu4) UNRELEASED; urgency=low
6+
7+ * debian/cobbler-ubuntu-import: Support wget'ing via a proxy via -p argument,
8+ correct error so that $ISO_DIR actually gets created if it doesn't exist.
9+ (LP: #892409)
10+
11+ -- Adam Gandelman <adamg@canonical.com> Fri, 18 Nov 2011 17:35:59 -0800
12+
13 cobbler (2.2.2-0ubuntu3) precise; urgency=low
14
15 * debian/patches/47_ubuntu_add_codenames.patch:
16
17=== modified file 'debian/cobbler-ubuntu-import'
18--- debian/cobbler-ubuntu-import 2011-10-24 19:29:26 +0000
19+++ debian/cobbler-ubuntu-import 2011-11-19 01:41:24 +0000
20@@ -28,6 +28,7 @@
21 not exist in $ISO_DIR
22 -r | --remove remove cobbler profile/distro and cached ISO
23 -u | --update update iso, import, replace outdated distro and profile
24+ -p | --proxy <host[:port> http proxy to use
25 -v | --verbose increase verbosity
26 Note, arch can be i386, x86_64, or amd64. However,
27 the registered distro and profile will use 'x86_64' rather than 'amd64'.
28@@ -136,7 +137,7 @@
29 [ "$md5sum_local" != "$md5sum_remote" ]
30 }
31
32-short_opts="Dhm:o:vcru"
33+short_opts="Dhm:o:p:vcru"
34 long_opts="delete-iso,help,mirror:,verbose,update-check,remove"
35 getopt_out=$(getopt --name "${0##*/}" \
36 --options "${short_opts}" --long "${long_opts}" -- "$@") &&
37@@ -155,6 +156,7 @@
38 -h|--help) Usage ; exit 0;;
39 -m|--mirror) mirror=${2}; shift;;
40 -D|--delete-iso) delete=true;;
41+ -p|--proxy) proxy=${2}; shift;;
42 -v|--verbose) VERBOSITY=$((${VERBOSITY}+1));;
43 -c|--update-check) check_update=true;;
44 -r|--remove) remove=true;;
45@@ -171,8 +173,13 @@
46 fail "failed to make tempdir"
47 trap cleanup EXIT
48
49+if [ -n $proxy ] ; then
50+ debug "Using proxy: $proxy"
51+ export http_proxy="$proxy"
52+fi
53+
54 # program starts here
55-if $delete; then
56+if ! $delete; then
57 { [ -d "$ISO_DIR" ] || mkdir -p "$ISO_DIR"; } || fail "failed to create $ISO_DIR"
58 fi
59 mkdir "$TEMP_D/mnt" || fail "failed to make tempdir/mnt"

Subscribers

People subscribed via source and target branches