launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #10589
[Merge] lp:~allenap/maas/tabs-to-spaces into lp:maas
Gavin Panella has proposed merging lp:~allenap/maas/tabs-to-spaces into lp:maas.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~allenap/maas/tabs-to-spaces/+merge/118149
--
https://code.launchpad.net/~allenap/maas/tabs-to-spaces/+merge/118149
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~allenap/maas/tabs-to-spaces into lp:maas.
=== modified file 'contrib/preseeds/maas.preseed'
--- contrib/preseeds/maas.preseed 2012-03-29 22:45:05 +0000
+++ contrib/preseeds/maas.preseed 2012-08-03 16:38:21 +0000
@@ -1,9 +1,9 @@
# MAAS - Ubuntu Server Installation
-# * Minimal install
+# * Minimal install
# * Cloud-init for bare-metal
# * maas_preseed snippet is expanded to provide cloud-init preseed data
-# Locale
+# Locale
d-i debian-installer/locale string en_US.UTF-8
# No splash
@@ -42,15 +42,15 @@
d-i base-installer/kernel/image string linux-server
# User Setup
-d-i passwd/root-login boolean false
-d-i passwd/make-user boolean true
-d-i passwd/user-fullname string ubuntu
-d-i passwd/username string ubuntu
-d-i passwd/user-password-crypted password !
-d-i passwd/user-uid string
-d-i user-setup/allow-password-weak boolean false
-d-i user-setup/encrypt-home boolean false
-d-i passwd/user-default-groups string adm cdrom dialout lpadmin plugdev sambashare
+d-i passwd/root-login boolean false
+d-i passwd/make-user boolean true
+d-i passwd/user-fullname string ubuntu
+d-i passwd/username string ubuntu
+d-i passwd/user-password-crypted password !
+d-i passwd/user-uid string
+d-i user-setup/allow-password-weak boolean false
+d-i user-setup/encrypt-home boolean false
+d-i passwd/user-default-groups string adm cdrom dialout lpadmin plugdev sambashare
# APT
$SNIPPET('maas_proxy')
@@ -87,7 +87,7 @@
$SNIPPET('maas_preseed')
# Post scripts. Executes late command and disables PXE
-d-i preseed/late_command string true && \
- $SNIPPET('maas_sudoers') && \
- $SNIPPET('maas_disable_pxe') && \
- true
+d-i preseed/late_command string true && \
+ $SNIPPET('maas_sudoers') && \
+ $SNIPPET('maas_disable_pxe') && \
+ true
=== modified file 'contrib/preseeds_v2/generic'
--- contrib/preseeds_v2/generic 2012-06-20 16:22:08 +0000
+++ contrib/preseeds_v2/generic 2012-08-03 16:38:21 +0000
@@ -17,7 +17,7 @@
{{def post_scripts}}
# Executes late command and disables PXE.
-d-i preseed/late_command string true && \
+d-i preseed/late_command string true && \
in-target sh -c 'f=$1; shift; echo $0 > $f && chmod 0440 $f $*' 'ubuntu ALL=(ALL) NOPASSWD: ALL' /etc/sudoers.d/maas && \
wget "{{node_disable_pxe_url|escape.shell}}" --post-data "{{node_disable_pxe_data|escape.shell}}" -O /dev/null && \
true
=== modified file 'contrib/preseeds_v2/preseed_master'
--- contrib/preseeds_v2/preseed_master 2012-06-22 07:50:12 +0000
+++ contrib/preseeds_v2/preseed_master 2012-08-03 16:38:21 +0000
@@ -42,15 +42,15 @@
d-i base-installer/kernel/image string linux-server
# User Setup
-d-i passwd/root-login boolean false
-d-i passwd/make-user boolean true
-d-i passwd/user-fullname string ubuntu
-d-i passwd/username string ubuntu
-d-i passwd/user-password-crypted password !
-d-i passwd/user-uid string
-d-i user-setup/allow-password-weak boolean false
-d-i user-setup/encrypt-home boolean false
-d-i passwd/user-default-groups string adm cdrom dialout lpadmin plugdev sambashare
+d-i passwd/root-login boolean false
+d-i passwd/make-user boolean true
+d-i passwd/user-fullname string ubuntu
+d-i passwd/username string ubuntu
+d-i passwd/user-password-crypted password !
+d-i passwd/user-uid string
+d-i user-setup/allow-password-weak boolean false
+d-i user-setup/encrypt-home boolean false
+d-i passwd/user-default-groups string adm cdrom dialout lpadmin plugdev sambashare
# APT
{{self.proxy}}
=== modified file 'etc/cron.d/maas-gc'
--- etc/cron.d/maas-gc 2012-04-10 09:09:59 +0000
+++ etc/cron.d/maas-gc 2012-08-03 16:38:21 +0000
@@ -1,8 +1,8 @@
# Perform daily background cleanups in MAAS.
-#
+#
# The "maas gc" command is for garbage-collection, such as deleting uploaded
# files from Juju's file storage API, and in the future commissioning logs,
# that have been superseded by newer ones. (This isn't done immediately
# when the files are overwritten because (1) the transaction that overwrites
# them may fail, and (2) a file may still be in use when it's overwritten.)
-0 0 * * * root /usr/sbin/maas gc &> /dev/null
+0 0 * * * root /usr/sbin/maas gc &> /dev/null
=== modified file 'etc/cron.d/maas-import-isos'
--- etc/cron.d/maas-import-isos 2012-04-02 20:14:49 +0000
+++ etc/cron.d/maas-import-isos 2012-08-03 16:38:21 +0000
@@ -1,3 +1,3 @@
# Runs maas-import-isos every Sunday at 4am
# This will get the new mini.iso and generate a new cobbler profile
-11 4 * * 0 root /usr/sbin/maas-import-isos &> /dev/null
+11 4 * * 0 root /usr/sbin/maas-import-isos &> /dev/null
=== modified file 'etc/cron.d/maas-import-pxe-files'
--- etc/cron.d/maas-import-pxe-files 2012-08-03 12:30:23 +0000
+++ etc/cron.d/maas-import-pxe-files 2012-08-03 16:38:21 +0000
@@ -1,3 +1,3 @@
# Runs the MAAS image downloads early every Sunday.
-11 4 * * 0 root /usr/sbin/maas-import-pxe-files &> /dev/null
+11 4 * * 0 root /usr/sbin/maas-import-pxe-files &> /dev/null
=== modified file 'etc/maas/commissioning-user-data'
--- etc/maas/commissioning-user-data 2012-06-22 09:48:17 +0000
+++ etc/maas/commissioning-user-data 2012-08-03 16:38:21 +0000
@@ -342,7 +342,7 @@
msg = exc.message
except Exception as exc:
msg = "unexpected error [%s]" % exc
-
+
sys.stderr.write("%s\n" % msg)
sys.exit((exc is None))
=== modified file 'etc/maas/import_ephemerals'
--- etc/maas/import_ephemerals 2012-04-18 20:51:28 +0000
+++ etc/maas/import_ephemerals 2012-08-03 16:38:21 +0000
@@ -1,4 +1,4 @@
-## get default settings from maas_import_iso
+## get default settings from maas_import_iso
[ ! -f /etc/maas/maas_import_iso ] || . /etc/maas/maas_import_iso
#REMOTE_IMAGES_MIRROR="https://cloud-images.ubuntu.com"
=== modified file 'man/maas-import-pxe-files.8'
--- man/maas-import-pxe-files.8 2012-07-17 03:41:17 +0000
+++ man/maas-import-pxe-files.8 2012-08-03 16:38:21 +0000
@@ -35,7 +35,7 @@
.SH "SEE ALSO"
.BR maas\-import\-ephemerals (8),
.BR maas\-import\-isos (8),
-.BR cron (8),
+.BR cron (8),
.BR wget (1)
.TP
=== modified file 'scripts/maas-import-ephemerals'
--- scripts/maas-import-ephemerals 2012-07-27 18:30:18 +0000
+++ scripts/maas-import-ephemerals 2012-08-03 16:38:21 +0000
@@ -79,7 +79,7 @@
Usage() {
- cat <<EOF
+ cat <<EOF
Usage: ${0##*/} [ options ] <<ARGUMENTS>>
Import ephemeral (commissioning) images into maas
@@ -99,124 +99,124 @@
cleanup() {
- [ -z "${TEMP_D}" -o ! -d "${TEMP_D}" ] || rm -Rf "${TEMP_D}"
+ [ -z "${TEMP_D}" -o ! -d "${TEMP_D}" ] || rm -Rf "${TEMP_D}"
}
debug() {
- local level=${1}; shift;
- [ "${level}" -gt "${VERBOSITY}" ] && return
- error "${@}"
+ local level=${1}; shift;
+ [ "${level}" -gt "${VERBOSITY}" ] && return
+ error "${@}"
}
arch2u() {
- # Normalize architecture name to an Ubuntu architecture name.
- _RET=$1
- case "$1" in
- i?86) _RET=i386;;
- x86_64) _RET=amd64;;
- esac
+ # Normalize architecture name to an Ubuntu architecture name.
+ _RET=$1
+ case "$1" in
+ i?86) _RET=i386;;
+ x86_64) _RET=amd64;;
+ esac
}
if [ -z "$NO_COBBLER" ]
then
arch2cob() {
- # Normalize an architecture name for use in Cobbler.
- _RET=$1
- case "$1" in
- i?86) _RET=i386;;
- amd64) _RET=x86_64;;
- esac
+ # Normalize an architecture name for use in Cobbler.
+ _RET=$1
+ case "$1" in
+ i?86) _RET=i386;;
+ amd64) _RET=x86_64;;
+ esac
}
fi
query_remote() {
- # query /query data at REMOTE_IMAGES_MIRROR
- # returns 7 values prefixed with 'r_'
- local iarch=$1 irelease=$2 istream=$3 out=""
- local burl="${REMOTE_IMAGES_MIRROR}/query"
- local url="$burl/$irelease/$istream/${STREAM}-dl.current.txt"
- mkdir -p "$TEMP_D/query"
- local target="$TEMP_D/query/$release.$stream"
- if [ ! -f "$TEMP_D/query/$release.$stream" ]; then
- wget -q "$url" -O "$target.tmp" && mv "$target.tmp" "$target" ||
- { error "failed to get $url"; return 1; }
- fi
-
- r_release=""; r_stream=""; r_label=""; r_serial="";
- r_arch=""; r_url=""; r_name=""
-
- out=$(awk '-F\t' '$1 == release && $2 == stream && $5 == arch { print $3, $4, $6, $7 }' \
- "arch=$iarch" "release=$irelease" "stream=$istream" \
- "$target") && [ -n "$out" ] ||
- return 1
-
- set -- ${out}
- r_release=$irelease
- r_stream=$istream
- r_label=$1;
- r_serial=$2;
- r_arch=$iarch
- r_url=$3
- r_name=$4
- return
+ # query /query data at REMOTE_IMAGES_MIRROR
+ # returns 7 values prefixed with 'r_'
+ local iarch=$1 irelease=$2 istream=$3 out=""
+ local burl="${REMOTE_IMAGES_MIRROR}/query"
+ local url="$burl/$irelease/$istream/${STREAM}-dl.current.txt"
+ mkdir -p "$TEMP_D/query"
+ local target="$TEMP_D/query/$release.$stream"
+ if [ ! -f "$TEMP_D/query/$release.$stream" ]; then
+ wget -q "$url" -O "$target.tmp" && mv "$target.tmp" "$target" ||
+ { error "failed to get $url"; return 1; }
+ fi
+
+ r_release=""; r_stream=""; r_label=""; r_serial="";
+ r_arch=""; r_url=""; r_name=""
+
+ out=$(awk '-F\t' '$1 == release && $2 == stream && $5 == arch { print $3, $4, $6, $7 }' \
+ "arch=$iarch" "release=$irelease" "stream=$istream" \
+ "$target") && [ -n "$out" ] ||
+ return 1
+
+ set -- ${out}
+ r_release=$irelease
+ r_stream=$istream
+ r_label=$1;
+ r_serial=$2;
+ r_arch=$iarch
+ r_url=$3
+ r_name=$4
+ return
}
query_local() {
- local iarch=$1 irelease=$2 istream=$3 out=""
- local label="" name="" serial="" url=""
-
- local found=""
- for i in "${DATA_DIR}/"$irelease/$istream/$iarch/*/info; do
- [ -f "$i" ] && found=$i
- done
- found=$(LC_ALL=C;
- cd "${DATA_DIR}/$irelease/$istream/$iarch" 2>/dev/null || exit 0;
- for d in [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]*; do
- [ -f "$d/info" ] && f=$d; done;
- [ -n "$f" ] && echo "$PWD/$f/info")
-
- l_release=""; l_stream=""; l_label=""; l_serial="";
- l_arch=""; l_url=""; l_name=""
- if [ -n "$found" ]; then
- . "$found"
- l_release="$release";
- l_stream="$stream";
- l_label="$label";
- l_serial="$serial";
- l_arch="$arch";
- l_url="$url";
- l_name="$name";
- l_dir="${found%/*}";
- fi
+ local iarch=$1 irelease=$2 istream=$3 out=""
+ local label="" name="" serial="" url=""
+
+ local found=""
+ for i in "${DATA_DIR}/"$irelease/$istream/$iarch/*/info; do
+ [ -f "$i" ] && found=$i
+ done
+ found=$(LC_ALL=C;
+ cd "${DATA_DIR}/$irelease/$istream/$iarch" 2>/dev/null || exit 0;
+ for d in [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]*; do
+ [ -f "$d/info" ] && f=$d; done;
+ [ -n "$f" ] && echo "$PWD/$f/info")
+
+ l_release=""; l_stream=""; l_label=""; l_serial="";
+ l_arch=""; l_url=""; l_name=""
+ if [ -n "$found" ]; then
+ . "$found"
+ l_release="$release";
+ l_stream="$stream";
+ l_label="$label";
+ l_serial="$serial";
+ l_arch="$arch";
+ l_url="$url";
+ l_name="$name";
+ l_dir="${found%/*}";
+ fi
}
serial_gt() {
- # is $1 a larger serial than $2 ?
- local a=${1:-0} b=${2:-0}
- case "$a" in
- *.[0-9]) a="${a%.*}${a##*.}";;
- esac
- case "$b" in
- *.[0-9]) b="${b%.*}${b##*.}";;
- esac
- [ $a -gt $b ]
+ # is $1 a larger serial than $2 ?
+ local a=${1:-0} b=${2:-0}
+ case "$a" in
+ *.[0-9]) a="${a%.*}${a##*.}";;
+ esac
+ case "$b" in
+ *.[0-9]) b="${b%.*}${b##*.}";;
+ esac
+ [ $a -gt $b ]
}
prep_dir() {
- local wd="$1" exdir="" tarball=""
- shift
- local release=$1 stream=$2 label=$3 serial=$4 arch=$5 url=$6 name=$7
- local furl="$REMOTE_IMAGES_MIRROR/$url"
+ local wd="$1" exdir="" tarball=""
+ shift
+ local release=$1 stream=$2 label=$3 serial=$4 arch=$5 url=$6 name=$7
+ local furl="$REMOTE_IMAGES_MIRROR/$url"
- mkdir -p "$wd"
- cat > "$wd/info" <<EOF
+ mkdir -p "$wd"
+ cat > "$wd/info" <<EOF
release=$release
stream=$stream
label=$label
@@ -226,83 +226,83 @@
name=$name
EOF
- # download
- local cachepath="${TARBALL_CACHE_D}/${name}.tar.gz" rmtar=""
- if [ -f "$cachepath" ]; then
- tarball="${cachepath}"
- elif [ -n "$TARBALL_CACHE_D" ]; then
- mkdir -p "$TARBALL_CACHE_D"
- debug 1 "downloading $name from $furl to local cache"
- wget "$furl" --progress=dot:mega -O "${cachepath}.part$$" &&
- mv "$cachepath.part$$" "$cachepath" || {
- rm "$cachepath.part$$"
- error "failed to download $furl";
- return 1;
- }
- tarball="${cachepath}"
- else
- debug 1 "downloading $name from $furl"
- tarball="$wd/dist.tar.gz"
- wget "$furl" --progress=dot:mega -O "${tarball}" ||
- { error "failed to download $furl"; return 1; }
- rmtar="$tarball"
- fi
-
- # extract
- exdir="$wd/.xx"
- mkdir -p "$exdir" &&
- debug 1 "extracting tarball" &&
- tar -Sxzf - -C "$exdir" < "$tarball" ||
- { error "failed to extract tarball from $furl"; return 1; }
-
- local x="" img="" kernel="" initrd=""
- for x in "$exdir/"*.img; do
- [ -f "$x" ] && img="$x" && break
- done
-
- for x in "$exdir/kernel" "$exdir/"*-vmlinuz*; do
- [ -f "$x" ] && kernel="$x" && break
- done
-
- for x in "$exdir/initrd" "$exdir/"*-initrd*; do
- [ -f "$x" ] && initrd="$x" && break
- done
-
- [ -n "$img" ] || { error "failed to find image in $furl"; return 1; }
- mv "$img" "$wd/disk.img" ||
- { error "failed to move extracted image to $wd/disk.img"; return 1; }
-
- [ -z "$kernel" ] || mv "$kernel" "$wd/kernel" ||
- { error "failed to move extracted kernel to $wd/kernel"; return 1; }
-
- [ -z "$initrd" ] || mv "$initrd" "$wd/initrd" ||
- { error "failed to move extracted initrd to $wd/initrd"; return 1; }
-
- rm -Rf "$exdir" || { error "failed to cleanup extract dir"; return 1; }
- { [ -z "$rmtar" ] || rm "$rmtar"; } ||
- { error "failed to remove temporary tarball $rmtar"; return 1; }
-
- if [ -n "$EPH_UPDATE_CMD" ]; then
- # update
- debug 1 "invoking: ${EPH_UPDATE_CMD[*]} ./disk.img ./kernel ./initrd"
- "${EPH_UPDATE_CMD[@]}" "$wd/disk.img" "$wd/kernel" "$wd/initrd" ||
- { error "failed to apply updates to $img"; return 1; }
- else
- [ -n "$kernel" -a -n "$initrd" ] || {
- error "missing kernel or initrd in tarball. set \$EPH_UPDATE_CMD";
- return 1;
- }
- fi
-
- return 0
+ # download
+ local cachepath="${TARBALL_CACHE_D}/${name}.tar.gz" rmtar=""
+ if [ -f "$cachepath" ]; then
+ tarball="${cachepath}"
+ elif [ -n "$TARBALL_CACHE_D" ]; then
+ mkdir -p "$TARBALL_CACHE_D"
+ debug 1 "downloading $name from $furl to local cache"
+ wget "$furl" --progress=dot:mega -O "${cachepath}.part$$" &&
+ mv "$cachepath.part$$" "$cachepath" || {
+ rm "$cachepath.part$$"
+ error "failed to download $furl";
+ return 1;
+ }
+ tarball="${cachepath}"
+ else
+ debug 1 "downloading $name from $furl"
+ tarball="$wd/dist.tar.gz"
+ wget "$furl" --progress=dot:mega -O "${tarball}" ||
+ { error "failed to download $furl"; return 1; }
+ rmtar="$tarball"
+ fi
+
+ # extract
+ exdir="$wd/.xx"
+ mkdir -p "$exdir" &&
+ debug 1 "extracting tarball" &&
+ tar -Sxzf - -C "$exdir" < "$tarball" ||
+ { error "failed to extract tarball from $furl"; return 1; }
+
+ local x="" img="" kernel="" initrd=""
+ for x in "$exdir/"*.img; do
+ [ -f "$x" ] && img="$x" && break
+ done
+
+ for x in "$exdir/kernel" "$exdir/"*-vmlinuz*; do
+ [ -f "$x" ] && kernel="$x" && break
+ done
+
+ for x in "$exdir/initrd" "$exdir/"*-initrd*; do
+ [ -f "$x" ] && initrd="$x" && break
+ done
+
+ [ -n "$img" ] || { error "failed to find image in $furl"; return 1; }
+ mv "$img" "$wd/disk.img" ||
+ { error "failed to move extracted image to $wd/disk.img"; return 1; }
+
+ [ -z "$kernel" ] || mv "$kernel" "$wd/kernel" ||
+ { error "failed to move extracted kernel to $wd/kernel"; return 1; }
+
+ [ -z "$initrd" ] || mv "$initrd" "$wd/initrd" ||
+ { error "failed to move extracted initrd to $wd/initrd"; return 1; }
+
+ rm -Rf "$exdir" || { error "failed to cleanup extract dir"; return 1; }
+ { [ -z "$rmtar" ] || rm "$rmtar"; } ||
+ { error "failed to remove temporary tarball $rmtar"; return 1; }
+
+ if [ -n "$EPH_UPDATE_CMD" ]; then
+ # update
+ debug 1 "invoking: ${EPH_UPDATE_CMD[*]} ./disk.img ./kernel ./initrd"
+ "${EPH_UPDATE_CMD[@]}" "$wd/disk.img" "$wd/kernel" "$wd/initrd" ||
+ { error "failed to apply updates to $img"; return 1; }
+ else
+ [ -n "$kernel" -a -n "$initrd" ] || {
+ error "missing kernel or initrd in tarball. set \$EPH_UPDATE_CMD";
+ return 1;
+ }
+ fi
+
+ return 0
}
write_tgt_conf() {
- local file="$1" target_name="$2" image="$3"
- shift 2;
- local release=$1 stream=$2 label=$3 serial=$4 arch=$5 url=$6 name=$7
- cat > "$file" <<EOF
+ local file="$1" target_name="$2" image="$3"
+ shift 2;
+ local release=$1 stream=$2 label=$3 serial=$4 arch=$5 url=$6 name=$7
+ cat > "$file" <<EOF
<target ${target_name}>
readonly 1
backing-store "$image"
@@ -314,10 +314,10 @@
if [ -z "$NO_COBBLER" ]
then
cobbler_has() {
- local noun="$1" name="$2" out=""
+ local noun="$1" name="$2" out=""
- out=$(cobbler "$noun" find "--name=$name" 2>/dev/null) &&
- [ "$out" = "$name" ]
+ out=$(cobbler "$noun" find "--name=$name" 2>/dev/null) &&
+ [ "$out" = "$name" ]
}
fi
@@ -325,27 +325,27 @@
if [ -z "$NO_COBBLER" ]
then
cobbler_add_update() {
- # cobbler_add_update(distro_name, profile_name,
- # release, arch, kopts, kickstart,
- # kernel, initrd)
- local distro="$1" profile="$2" release="$3" arch="$4"
- local kernel="$5" initrd="$6" kopts="$7" kickstart="$8"
- local op
-
- cobbler_has distro "$distro" && op="edit" || op="add"
-
- cobbler distro "$op" "--name=$distro" --breed=ubuntu \
- "--os-version=$release" "--arch=$arch" \
- "--kernel=$kernel" "--initrd=$initrd" ||
- { error "failed to $op $distro"; return 1; }
-
- cobbler_has profile "$profile" && op="edit" || op="add"
-
- cobbler profile "$op" "--name=$profile" "--distro=$distro" \
- --kopts="$kopts" "--kickstart=$kickstart" ||
- { error "failed to $op $profile"; return 1; }
-
- return 0
+ # cobbler_add_update(distro_name, profile_name,
+ # release, arch, kopts, kickstart,
+ # kernel, initrd)
+ local distro="$1" profile="$2" release="$3" arch="$4"
+ local kernel="$5" initrd="$6" kopts="$7" kickstart="$8"
+ local op
+
+ cobbler_has distro "$distro" && op="edit" || op="add"
+
+ cobbler distro "$op" "--name=$distro" --breed=ubuntu \
+ "--os-version=$release" "--arch=$arch" \
+ "--kernel=$kernel" "--initrd=$initrd" ||
+ { error "failed to $op $distro"; return 1; }
+
+ cobbler_has profile "$profile" && op="edit" || op="add"
+
+ cobbler profile "$op" "--name=$profile" "--distro=$distro" \
+ --kopts="$kopts" "--kickstart=$kickstart" ||
+ { error "failed to $op $profile"; return 1; }
+
+ return 0
}
fi
@@ -353,14 +353,14 @@
if [ -z "$NO_COBBLER" ]
then
replace() {
- # replace(input, key1, value1, key2, value2, ...)
- local input="$1" key="" val=""
- shift
- while [ $# -ne 0 ]; do
- input=${input//$1/$2}
- shift 2
- done
- _RET=${input}
+ # replace(input, key1, value1, key2, value2, ...)
+ local input="$1" key="" val=""
+ shift
+ while [ $# -ne 0 ]; do
+ input=${input//$1/$2}
+ shift 2
+ done
+ _RET=${input}
}
fi
@@ -390,32 +390,32 @@
short_opts="hciuv"
long_opts="help,import,update,update-check,verbose"
getopt_out=$(getopt --name "${0##*/}" \
- --options "${short_opts}" --long "${long_opts}" -- "$@") &&
- eval set -- "${getopt_out}" ||
- bad_Usage
+ --options "${short_opts}" --long "${long_opts}" -- "$@") &&
+ eval set -- "${getopt_out}" ||
+ bad_Usage
check=0
import=0
update=0
while [ $# -ne 0 ]; do
- cur=${1}; next=${2};
- case "$cur" in
- -h|--help) Usage ; exit 0;;
- -v|--verbose) VERBOSITY=$((${VERBOSITY}+1));;
- -i|--import) import=1;;
- -c|--update-check) check=1;;
- -u|--update) update=1;;
- --) shift; break;;
- esac
- shift;
+ cur=${1}; next=${2};
+ case "$cur" in
+ -h|--help) Usage ; exit 0;;
+ -v|--verbose) VERBOSITY=$((${VERBOSITY}+1));;
+ -i|--import) import=1;;
+ -c|--update-check) check=1;;
+ -u|--update) update=1;;
+ --) shift; break;;
+ esac
+ shift;
done
[ $import -eq 0 -a $check -eq 0 -a $update -eq 0 ] && import=1
[ $(($import + $check + $update)) -eq 0 ] && import=1
[ $(($import + $check + $update)) -eq 1 ] ||
- bad_Usage "only one of --update-check, --update, --import may be given"
+ bad_Usage "only one of --update-check, --update, --import may be given"
[ ! -f "$CONFIG" ] || . "$CONFIG"
[ ! -f ".${CONFIG}" ] || . ".${CONFIG}"
@@ -425,28 +425,31 @@
then
# get default server ip
[ -n "$SERVER_IP" ] ||
- _ip=$(awk '$1 == "server:" { print $2 }' /etc/cobbler/settings) ||
- fail "must set SERVER_IP to cobbler server"
+ _ip=$(awk '$1 == "server:" { print $2 }' /etc/cobbler/settings) ||
+ fail "must set SERVER_IP to cobbler server"
SERVER_IP=${SERVER_IP:-${_ip}}
[ -n "${SERVER_IP}" ] &&
- KOPTS="$KOPTS log_host=$SERVER_IP log_port=514"
+ KOPTS="$KOPTS log_host=$SERVER_IP log_port=514"
fi
+if [ -z "$NO_COBBLER" ]
+then
ISCSI_TARGET_IP=${ISCSI_TARGET_IP:-${SERVER_IP}}
[ -n "$ISCSI_TARGET_IP" ] || fail "ISCSI_TARGET_IP must have a value"
+fi
if [ -z "$NO_COBBLER" ]
then
[ -f "$KICKSTART" ] ||
- fail "kickstart $KICKSTART is not a file"
+ fail "kickstart $KICKSTART is not a file"
fi
mkdir -p "$DATA_DIR" "$DATA_DIR/.working" ||
- fail "failed to make $DATA_DIR"
+ fail "failed to make $DATA_DIR"
TEMP_D=$(mktemp -d "$DATA_DIR/.working/${0##*/}.XXXXXX") ||
fail "failed to make tempdir"
@@ -456,9 +459,9 @@
tgt_conf="${DATA_DIR}/tgt.conf"
mkdir -p "$tgt_conf_d" ||
- fail "failed to make directories"
+ fail "failed to make directories"
if [ ! -f "${tgt_conf}" ]; then
- cat > "${tgt_conf}" <<EOF
+ cat > "${tgt_conf}" <<EOF
include ${DATA_DIR}/tgt.conf.d/*.conf
default-driver iscsi
EOF
@@ -466,111 +469,111 @@
updates=0
for release in $RELEASES; do
- for arch in $ARCHES; do
- arch2cob "$arch"; arch_c=$_RET
- arch2u "$arch"; arch_u=$_RET
-
- query_local "$arch_u" "$release" "$BUILD_NAME" ||
- fail "failed to query local for $release/$arch"
- query_remote "$arch_u" "$release" "$BUILD_NAME" ||
- fail "remote query of $REMOTE_IMAGES_MIRROR failed"
-
- if [ $update -eq 0 -o -z "$l_dir" ]; then
- serial_gt "$r_serial" "$l_serial" || {
- debug 1 "$release-${arch_u} in ${l_dir} is up to date";
- continue;
- }
-
- # an update is needed remote serial is newer than local
- updates=$(($updates+1))
-
- # check only
- [ $check -eq 0 ] || continue
-
- debug 1 "updating $release-$arch ($l_name => $r_name)"
- wd="${TEMP_D}/$release/$arch"
- prep_dir "$wd" \
- "$r_release" "$r_stream" "$r_label" \
- "$r_serial" "$r_arch" "$r_url" "$r_name" ||
- fail "failed to prepare image for $release/$arch"
+ for arch in $ARCHES; do
+ arch2cob "$arch"; arch_c=$_RET
+ arch2u "$arch"; arch_u=$_RET
+
+ query_local "$arch_u" "$release" "$BUILD_NAME" ||
+ fail "failed to query local for $release/$arch"
+ query_remote "$arch_u" "$release" "$BUILD_NAME" ||
+ fail "remote query of $REMOTE_IMAGES_MIRROR failed"
+
+ if [ $update -eq 0 -o -z "$l_dir" ]; then
+ serial_gt "$r_serial" "$l_serial" || {
+ debug 1 "$release-${arch_u} in ${l_dir} is up to date";
+ continue;
+ }
+
+ # an update is needed remote serial is newer than local
+ updates=$(($updates+1))
+
+ # check only
+ [ $check -eq 0 ] || continue
+
+ debug 1 "updating $release-$arch ($l_name => $r_name)"
+ wd="${TEMP_D}/$release/$arch"
+ prep_dir "$wd" \
+ "$r_release" "$r_stream" "$r_label" \
+ "$r_serial" "$r_arch" "$r_url" "$r_name" ||
+ fail "failed to prepare image for $release/$arch"
install_tftp_image "$wd" "$r_arch" "generic" "$r_release"
- target_name="${TARGET_NAME_PREFIX}${r_name}"
-
- final_d="${r_release}/${r_stream}/${r_arch}/${r_serial}"
- fpfinal_d="${DATA_DIR}/${final_d}"
- mkdir -p "${fpfinal_d}"
-
- mv "$wd/"* "${fpfinal_d}/" ||
- fail "failed to move contents to final directory ${fpfinal_d}"
- name="${r_name}"
- else
- fpfinal_d="${l_dir}"
- final_d="${l_release}/${l_stream}/${l_arch}/${l_serial}"
-
- name="${l_name}"
- target_name="${TARGET_NAME_PREFIX}${name}"
- debug 1 "updating ${release}-${arch} $final_d"
- fi
-
- rel_tgt="../${final_d}/tgt.conf"
-
- # iscsi_update
- write_tgt_conf "${fpfinal_d}/tgt.conf" "$target_name" \
- "${fpfinal_d}/disk.img" ||
- fail "failed to write tgt.conf for $release/$arch"
-
- ln -sf "$rel_tgt" "${tgt_conf_d}/${name}.conf" ||
- fail "failed to symlink ${name}.conf into place"
-
- ver_out="${TEMP_D}/verify.${target_name}"
- tgt-admin --conf "$SYS_TGT_CONF" --update "${target_name}" &&
- tgt-admin --conf "$SYS_TGT_CONF" --show > "${ver_out}" &&
- grep -q "^Target [0-9][0-9]*: ${target_name}" "${ver_out}" || {
- mv "${fpfinal_d}/info" "${fpfinal_d}/info.failed"
- tgt-admin --conf "$SYS_TGT_CONF" --delete "$target_name"
- rm "${tgt_conf_d}/${name}.conf"
- fail "failed tgt-admin add for $name"
- }
+ target_name="${TARGET_NAME_PREFIX}${r_name}"
+
+ final_d="${r_release}/${r_stream}/${r_arch}/${r_serial}"
+ fpfinal_d="${DATA_DIR}/${final_d}"
+ mkdir -p "${fpfinal_d}"
+
+ mv "$wd/"* "${fpfinal_d}/" ||
+ fail "failed to move contents to final directory ${fpfinal_d}"
+ name="${r_name}"
+ else
+ fpfinal_d="${l_dir}"
+ final_d="${l_release}/${l_stream}/${l_arch}/${l_serial}"
+
+ name="${l_name}"
+ target_name="${TARGET_NAME_PREFIX}${name}"
+ debug 1 "updating ${release}-${arch} $final_d"
+ fi
+
+ rel_tgt="../${final_d}/tgt.conf"
+
+ # iscsi_update
+ write_tgt_conf "${fpfinal_d}/tgt.conf" "$target_name" \
+ "${fpfinal_d}/disk.img" ||
+ fail "failed to write tgt.conf for $release/$arch"
+
+ ln -sf "$rel_tgt" "${tgt_conf_d}/${name}.conf" ||
+ fail "failed to symlink ${name}.conf into place"
+
+ ver_out="${TEMP_D}/verify.${target_name}"
+ tgt-admin --conf "$SYS_TGT_CONF" --update "${target_name}" &&
+ tgt-admin --conf "$SYS_TGT_CONF" --show > "${ver_out}" &&
+ grep -q "^Target [0-9][0-9]*: ${target_name}" "${ver_out}" || {
+ mv "${fpfinal_d}/info" "${fpfinal_d}/info.failed"
+ tgt-admin --conf "$SYS_TGT_CONF" --delete "$target_name"
+ rm "${tgt_conf_d}/${name}.conf"
+ fail "failed tgt-admin add for $name"
+ }
if [ -z "$NO_COBBLER" ]
then
- # cobbler_update
- kopts_in="$EPH_CONSOLE_KOPTS $EPH_KOPTS_ISCSI $EPH_KOPTS_ROOT $EPH_KOPTS_LOGGING"
- replace "${kopts_in}" \
- "@@server_ip@@" "$SERVER_IP" \
- "@@iscsi_target@@" "${target_name}" \
- "@@iscsi_target_ip@@" "${ISCSI_TARGET_IP}"
- kopts=$_RET
+ # cobbler_update
+ kopts_in="$EPH_CONSOLE_KOPTS $EPH_KOPTS_ISCSI $EPH_KOPTS_ROOT $EPH_KOPTS_LOGGING"
+ replace "${kopts_in}" \
+ "@@server_ip@@" "$SERVER_IP" \
+ "@@iscsi_target@@" "${target_name}" \
+ "@@iscsi_target_ip@@" "${ISCSI_TARGET_IP}"
+ kopts=$_RET
- distro="$release-${arch_c}-maas-ephemeral"
- profile="maas-${release}-${arch_c}-commissioning"
- kernel="$fpfinal_d/kernel"
- initrd="$fpfinal_d/initrd"
- debug 1 "updating profile $profile, distro $distro kopts:${kopts}"
- debug 2 cobbler_add_update "$distro" "$profile" "$release" "${arch_c}" \
- "$kernel" "$initrd" "$kopts" "$KICKSTART"
- cobbler_add_update "$distro" "$profile" "$release" "${arch_c}" \
- "$kernel" "$initrd" "$kopts" "$KICKSTART" || {
- mv "${fpfinal_d}/info" "${fpfinal_d}/info.failed"
- tgt-admin --conf "$SYS_TGT_CONF" --delete "$target_name"
- rm "${tgt_conf_d}/${name}.conf";
- fail "failed to update cobbler for $profile/$distro"
- }
+ distro="$release-${arch_c}-maas-ephemeral"
+ profile="maas-${release}-${arch_c}-commissioning"
+ kernel="$fpfinal_d/kernel"
+ initrd="$fpfinal_d/initrd"
+ debug 1 "updating profile $profile, distro $distro kopts:${kopts}"
+ debug 2 cobbler_add_update "$distro" "$profile" "$release" "${arch_c}" \
+ "$kernel" "$initrd" "$kopts" "$KICKSTART"
+ cobbler_add_update "$distro" "$profile" "$release" "${arch_c}" \
+ "$kernel" "$initrd" "$kopts" "$KICKSTART" || {
+ mv "${fpfinal_d}/info" "${fpfinal_d}/info.failed"
+ tgt-admin --conf "$SYS_TGT_CONF" --delete "$target_name"
+ rm "${tgt_conf_d}/${name}.conf";
+ fail "failed to update cobbler for $profile/$distro"
+ }
fi
- done
+ done
done
if [ $check -eq 1 ]; then
- # if --update-check, but no updates needed, exit 3
- [ $updates_needed -eq 0 ] && exit 3
- # if updates are needed, exit 0
- exit 0
+ # if --update-check, but no updates needed, exit 3
+ [ $updates_needed -eq 0 ] && exit 3
+ # if updates are needed, exit 0
+ exit 0
fi
@@ -588,4 +591,4 @@
# * else
# * remove directory
-# vi: ts=4 noexpandtab
+# vi: ts=4 expandtab
=== modified file 'scripts/maas-import-isos'
--- scripts/maas-import-isos 2012-04-17 13:29:20 +0000
+++ scripts/maas-import-isos 2012-08-03 16:38:21 +0000
@@ -5,10 +5,10 @@
# Copyright (C) 2011-2012 Canonical
#
# Authors:
-# Marc Cluet <marc.cluet@xxxxxxxxxxxxx>
-# Dustin Kirkland <kirkland@xxxxxxxxxxxxx>
-# Andres Rodriguez <andres.rodriguez@xxxxxxxxxxxxx>
-# Scott Moser <scott.moser@xxxxxxxxxxxxx>
+# Marc Cluet <marc.cluet@xxxxxxxxxxxxx>
+# Dustin Kirkland <kirkland@xxxxxxxxxxxxx>
+# Andres Rodriguez <andres.rodriguez@xxxxxxxxxxxxx>
+# Scott Moser <scott.moser@xxxxxxxxxxxxx>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
@@ -24,8 +24,8 @@
# Ensure root
if [ "$(id -u)" != "0" ]; then
- echo "ERROR: $0 must run as root" 2>&1
- exit 1
+ echo "ERROR: $0 must run as root" 2>&1
+ exit 1
fi
# Definitions for supported releases and architectures
@@ -41,65 +41,65 @@
[ -n "$ENLIST_PROFILE" ] || ENLIST_PROFILE="maas-enlist"
[ -n "$IMPORT_EPHEMERALS" ] || IMPORT_EPHEMERALS=1
if [ -n "$SERVER_IP" ]; then
- KOPTS="$KOPTS log_host=$SERVER_IP log_port=514"
+ KOPTS="$KOPTS log_host=$SERVER_IP log_port=514"
else
- if grep -qs "^server: " /etc/cobbler/settings >/dev/null 2>&1; then
- SERVER_IP=$(grep "^server: " /etc/cobbler/settings | awk '{print $2}')
- KOPTS="$KOPTS log_host=$SERVER_IP log_port=514"
- fi
+ if grep -qs "^server: " /etc/cobbler/settings >/dev/null 2>&1; then
+ SERVER_IP=$(grep "^server: " /etc/cobbler/settings | awk '{print $2}')
+ KOPTS="$KOPTS log_host=$SERVER_IP log_port=514"
+ fi
fi
if [ -n "$CONSOLE" ]; then
- KOPTS="$KOPTS console=$CONSOLE"
+ KOPTS="$KOPTS console=$CONSOLE"
fi
name_arch_in_cobbler_style() {
- echo "$1" | sed -e 's/amd64/x86_64/' -e 's/i686/i386/'
+ echo "$1" | sed -e 's/amd64/x86_64/' -e 's/i686/i386/'
}
update_settings(){
- local r a profile
- # Updates the parent profiles with new settings. Only affects KOPTS
- for r in $RELEASES; do
- for a in $ARCHES; do
- a=$(name_arch_in_cobbler_style "$a")
- profile="maas-$r-$a"
- # If profile exists, update it.
- if (cobbler profile list | grep -qs " $profile$"); then
- cobbler profile edit --name="$profile" --kopts="$KOPTS"
- fi
- done
- done
+ local r a profile
+ # Updates the parent profiles with new settings. Only affects KOPTS
+ for r in $RELEASES; do
+ for a in $ARCHES; do
+ a=$(name_arch_in_cobbler_style "$a")
+ profile="maas-$r-$a"
+ # If profile exists, update it.
+ if (cobbler profile list | grep -qs " $profile$"); then
+ cobbler profile edit --name="$profile" --kopts="$KOPTS"
+ fi
+ done
+ done
- [ "$IMPORT_EPHEMERALS" = "0" ] || maas-import-ephemerals --update
+ [ "$IMPORT_EPHEMERALS" = "0" ] || maas-import-ephemerals --update
}
import_isos(){
- local r a profile
- # Wget and import net install ISOs
- for r in $RELEASES; do
- for a in $ARCHES; do
- a=$(name_arch_in_cobbler_style "$a")
- profile="$r-$a"
- # Skip if cobbler already has this distro/arch combo
- if ! (cobbler distro list | grep -qs " $profile$"); then
- # Import the iso
- cobbler-ubuntu-import $profile
- else
- # check archive for an updated ISO, update our cache if necessary
- cobbler-ubuntu-import -c $profile && cobbler-ubuntu-import -u $profile
-
- fi
- # Skip if cobbler already has this distro/arch profile
- if ! (cobbler profile list | grep -qs " maas-$profile$"); then
- # Add JuJu sub-profile based on the name of the imported ISO
- cobbler profile add --name="maas-$profile" --parent="$profile" --kopts="$KOPTS" --kickstart="$KSDIR/maas.preseed"
- fi
- done
- done
-
- [ "${IMPORT_EPHEMERALS}" = "0" ] || maas-import-ephemerals --import
+ local r a profile
+ # Wget and import net install ISOs
+ for r in $RELEASES; do
+ for a in $ARCHES; do
+ a=$(name_arch_in_cobbler_style "$a")
+ profile="$r-$a"
+ # Skip if cobbler already has this distro/arch combo
+ if ! (cobbler distro list | grep -qs " $profile$"); then
+ # Import the iso
+ cobbler-ubuntu-import $profile
+ else
+ # check archive for an updated ISO, update our cache if necessary
+ cobbler-ubuntu-import -c $profile && cobbler-ubuntu-import -u $profile
+
+ fi
+ # Skip if cobbler already has this distro/arch profile
+ if ! (cobbler profile list | grep -qs " maas-$profile$"); then
+ # Add JuJu sub-profile based on the name of the imported ISO
+ cobbler profile add --name="maas-$profile" --parent="$profile" --kopts="$KOPTS" --kickstart="$KSDIR/maas.preseed"
+ fi
+ done
+ done
+
+ [ "${IMPORT_EPHEMERALS}" = "0" ] || maas-import-ephemerals --import
}
add_enlist_profile(){
@@ -164,14 +164,14 @@
do_update_settings=false
while [ $# -ne 0 ]; do
- cur=${1};
- case "$cur" in
- -h|--help) Usage ; exit 0;;
- -i|--import-isos) do_import_isos=true;;
- -u|--update-settings) do_update_settings=true;;
- --) shift; break;;
- esac
- shift;
+ cur=${1};
+ case "$cur" in
+ -h|--help) Usage ; exit 0;;
+ -i|--import-isos) do_import_isos=true;;
+ -u|--update-settings) do_update_settings=true;;
+ --) shift; break;;
+ esac
+ shift;
done
## check arguments here
@@ -182,8 +182,8 @@
# do not allow import + update
( $do_import_isos && $do_update_settings ) && bad_Usage
-$do_import_isos && import_isos
-$do_update_settings && update_settings
+$do_import_isos && import_isos
+$do_update_settings && update_settings
# Add enlist profile if doesn't exist
add_enlist_profile
=== modified file 'scripts/maas-import-pxe-files'
--- scripts/maas-import-pxe-files 2012-08-03 13:22:39 +0000
+++ scripts/maas-import-pxe-files 2012-08-03 16:38:21 +0000
@@ -107,7 +107,7 @@
DOWNLOAD_DIR=$(mktemp -d)
echo "Downloading to temporary location $DOWNLOAD_DIR."
- cd -- $DOWNLOAD_DIR
+ pushd -- $DOWNLOAD_DIR
# All files we create here are public. The TFTP user will need to be
# able to read them.
@@ -123,6 +123,7 @@
done
done
+ popd
rm -rf -- $DOWNLOAD_DIR
}
=== modified file 'src/maasserver/templates/maasserver/base.html'
--- src/maasserver/templates/maasserver/base.html 2012-06-26 09:47:31 +0000
+++ src/maasserver/templates/maasserver/base.html 2012-08-03 16:38:21 +0000
@@ -105,7 +105,7 @@
<div id="footer">
<img src="{{ STATIC_URL }}img/ubuntu_logo_footer.png" alt="Ubuntu" />
{% block footer-copyright %}
- <p>© 2012 Canonical Ltd. Ubuntu and Canonical are registered
+ <p>© 2012 Canonical Ltd. Ubuntu and Canonical are registered
trademarks of Canonical Ltd.
<a class="space-left-small" href="https://wiki.ubuntu.com/ServerTeam/MAAS/" target="_blank">View Documentation</a></p>
{% endblock %}
=== modified file 'src/maasserver/templates/maasserver/form_field.html'
--- src/maasserver/templates/maasserver/form_field.html 2012-03-05 04:44:52 +0000
+++ src/maasserver/templates/maasserver/form_field.html 2012-08-03 16:38:21 +0000
@@ -1,4 +1,4 @@
-{% load field_type %}
+{% load field_type %}
<li class="{{ field.html_name }}{% if field.errors %} error{% endif %}">
<label for="id_{{ field.html_name }}">
{% ifequal field|field_type "CheckboxInput" %}
=== modified file 'src/maasserver/templates/maasserver/index.html'
--- src/maasserver/templates/maasserver/index.html 2012-06-26 09:47:31 +0000
+++ src/maasserver/templates/maasserver/index.html 2012-08-03 16:38:21 +0000
@@ -35,7 +35,7 @@
// Setup TitleEditWidget.
var title_widget = new Y.maas.utils.TitleEditWidget(
- {srcNode: '.page-title-form'});
+ {srcNode: '.page-title-form'});
title_widget.render();
{% if longpoll_queue and LONGPOLL_PATH %}
=== modified file 'src/maasserver/templates/maasserver/prefs.html'
--- src/maasserver/templates/maasserver/prefs.html 2012-06-28 12:05:09 +0000
+++ src/maasserver/templates/maasserver/prefs.html 2012-08-03 16:38:21 +0000
@@ -51,8 +51,8 @@
</a>
{{ key.display_html }}
</li>
- {% empty %}
- No SSH key configured.
+ {% empty %}
+ No SSH key configured.
{% endfor %}
</ul>
<a href="{% url 'prefs-add-sshkey' %}"
@@ -66,8 +66,8 @@
<ul>
{% for field in profile_form %}
{% include "maasserver/form_field.html" %}
- {% endfor %}
- </ul>
+ {% endfor %}
+ </ul>
<input type="hidden" name="profile_submit" value="1" />
<input type="submit" class="button right" value="Save" />
</form>
=== modified file 'src/maasserver/templates/maasserver/prefs_confirm_delete_sshkey.html'
--- src/maasserver/templates/maasserver/prefs_confirm_delete_sshkey.html 2012-06-28 12:05:09 +0000
+++ src/maasserver/templates/maasserver/prefs_confirm_delete_sshkey.html 2012-08-03 16:38:21 +0000
@@ -8,7 +8,7 @@
<h2>
Are you sure you want to delete the following key?<br />
</h2>
- <p style="word-wrap: break-word; width: 700px;">{{ key }}</p>
+ <p style="word-wrap: break-word; width: 700px;">{{ key }}</p>
<p>This action is permanent and can not be undone.</p>
<p>
<form action="." method="post">{% csrf_token %}
@@ -19,4 +19,3 @@
</p>
</div>
{% endblock %}
-
=== modified file 'src/maasserver/templates/maasserver/settings.html'
--- src/maasserver/templates/maasserver/settings.html 2012-06-28 12:05:09 +0000
+++ src/maasserver/templates/maasserver/settings.html 2012-08-03 16:38:21 +0000
@@ -42,7 +42,7 @@
<a href="{% url 'accounts-edit' user_item.username %}"
title="Edit user {{ user_item.username }}"
class="icon">
- <img src="{{ STATIC_URL }}img/edit.png"
+ <img src="{{ STATIC_URL }}img/edit.png"
alt="edit"
class="space-right-small" />
</a>
@@ -93,7 +93,7 @@
<li>
<label>Custom archives</label>
<a href="{% url "settings-add-archive" %}">
- <img src="{{ STATIC_URL }}img/inline_add.png"
+ <img src="{{ STATIC_URL }}img/inline_add.png"
alt="Add" class="icon" />
Add archive for newly provisioned machines
</a>
=== modified file 'src/maasserver/templates/maasserver/user_edit.html'
--- src/maasserver/templates/maasserver/user_edit.html 2012-06-28 12:05:09 +0000
+++ src/maasserver/templates/maasserver/user_edit.html 2012-08-03 16:38:21 +0000
@@ -12,7 +12,7 @@
{% csrf_token %}
<ul>
{% for field in profile_form %}
- {% include "maasserver/form_field.html" %}
+ {% include "maasserver/form_field.html" %}
{% endfor %}
</ul>
<input type="hidden" name="profile_submit" value="1" />
@@ -27,7 +27,7 @@
{% csrf_token %}
<ul>
{% for field in password_form %}
- {% include "maasserver/form_field.html" %}
+ {% include "maasserver/form_field.html" %}
{% endfor %}
</ul>
<input type="hidden" name="password_submit" value="1" />
=== modified file 'vdenv/api-list.py'
--- vdenv/api-list.py 2012-04-16 10:00:51 +0000
+++ vdenv/api-list.py 2012-08-03 16:38:21 +0000
@@ -38,7 +38,7 @@
print("%s: breed=%s, os_version=%s, mgmt_classes=%s" %
(d['name'], d['breed'], d['os_version'], d['mgmt_classes']))
-profiles = server.get_profiles()
+profiles = server.get_profiles()
print("\n::::::::::: profiles :::::::::::")
for d in server.get_profiles():
print("%s: distro=%s parent=%s kickstart=%s" %
=== modified file 'vdenv/settings.cfg'
--- vdenv/settings.cfg 2012-01-09 23:28:36 +0000
+++ vdenv/settings.cfg 2012-08-03 16:38:21 +0000
@@ -9,7 +9,7 @@
start: 2
end: 254
template: libvirt-network.tmpl
-
+
systems:
zimmer:
ip: 2 # ip address must be in dhcp range
=== modified file 'vdenv/setup.py'
--- vdenv/setup.py 2012-04-16 10:00:51 +0000
+++ vdenv/setup.py 2012-08-03 16:38:21 +0000
@@ -91,7 +91,7 @@
# mac: 00:16:3e:3e:a9:1a
# template: libvirt-system.tmpl
# mem: 524288
-#
+#
#nodes:
# prefix: node
# mac_pre: 00:16:3e:3e:aa
@@ -195,7 +195,7 @@
hostip = "%s.1" % config['network']['ip_pre']
arch = get_profile_arch()
profile = "maas-precise-%s" % arch
-
+
cob = System(config, "zimmer")
cobbler_url = "http://%s/cobbler_api" % cob.ipaddr
print("Connecting to %s." % cobbler_url)
=== modified file 'vdenv/zimmer-build/ud-build.txt'
--- vdenv/zimmer-build/ud-build.txt 2012-07-19 18:00:02 +0000
+++ vdenv/zimmer-build/ud-build.txt 2012-08-03 16:38:21 +0000
@@ -20,7 +20,7 @@
echo === $(date) ====
debconf-set-selections <<EOF
- cloud-init cloud-init/datasources multiselect NoCloud
+ cloud-init cloud-init/datasources multiselect NoCloud
EOF
export DEBIAN_FRONTEND=noninteractive;
@@ -32,9 +32,9 @@
hostname zimmer
echo "127.0.1.2 zimmer-server" >> /etc/hosts
-
+
echo === $(date): starting apt ====
- apt_get() {
+ apt_get() {
DEBIAN_FRONTEND=noninteractive apt-get \
--option "Dpkg::Options::=--force-confold" --assume-yes "$@"
}
@@ -44,7 +44,7 @@
pkgs="$pkgs maas" # main maas package
apt_get update
apt_get install ${pkgs}
-
+
# if local apt is configured to use a proxy, modify
# cobbler to tell nodes to use that proxy. (LP: #914202)
if [ "${PROXY_COPY_SYS_TO_COBBLER:-1}" != "0" ] &&
@@ -107,7 +107,7 @@
}
[ "$1" = "-h" -o "$1" = "--help" ] && { Usage; exit 0; }
[ "$1" = "set" -o "$1" = "show" ] || { Usage 1>&2; exit 1; }
-
+
get() {
_RET=$(debconf-show ${1%%/*} 2>/dev/null |
awk '{gsub("[*]","");} $1 == key { print $2 }' "key=$1:")
@@ -116,7 +116,7 @@
while [ $# -ne 0 ]; do
get $1; echo "$1: $_RET"
shift
- done
+ done
}
get_ip() {
# stolen from /var/lib/dpkg/info/maas.postinst
@@ -154,7 +154,7 @@
fi
END_MAAS_SET_IP
chmod 755 /usr/local/bin/maas-set-ip
-
+
my_release=$(lsb_release -c)
cat >> /etc/maas/import_isos <<END
RELEASES="${my_release}"