← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~jtv/maas/bug-1060411 into lp:maas

 

Jeroen T. Vermeulen has proposed merging lp:~jtv/maas/bug-1060411 into lp:maas.

Commit message:
Don't do complex shell variable initialization within the "local" command: it suppresses errors!

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #1060411 in MAAS: "maas-import-pxe-files does not catch failure of compose_installer_download_files"
  https://bugs.launchpad.net/maas/+bug/1060411

For more details, see:
https://code.launchpad.net/~jtv/maas/bug-1060411/+merge/127628

Pointed out by Scott.


Jeroen
-- 
https://code.launchpad.net/~jtv/maas/bug-1060411/+merge/127628
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~jtv/maas/bug-1060411 into lp:maas.
=== modified file 'scripts/maas-import-pxe-files'
--- scripts/maas-import-pxe-files	2012-10-02 17:00:19 +0000
+++ scripts/maas-import-pxe-files	2012-10-03 03:41:21 +0000
@@ -49,7 +49,8 @@
 # Default is yes.
 IMPORT_EPHEMERALS=${IMPORT_EPHEMERALS:-1}
 
-# show script usage/summary.
+
+# Show script usage/summary.
 show_usage() {
     echo "Usage: ${0##*/}"
     echo
@@ -64,6 +65,7 @@
     echo
 }
 
+
 # Put together a full URL for where the installer files for architecture $1
 # and release $2 can be downloaded.
 compose_installer_download_url() {
@@ -92,6 +94,7 @@
     esac
 }
 
+
 # Return a list of files for architecture $1 and release $2 that need to be
 # downloaded
 compose_installer_download_files() {
@@ -111,6 +114,7 @@
     esac
 }
 
+
 # Rename downloaded files for architecture $1 and release $2 into the form that
 # MAAS expects them
 rename_installer_download_files() {
@@ -130,6 +134,7 @@
     esac
 }
 
+
 # Copy the pre-boot loader pxelinux.0, and modules we need, from the
 # installed syslinux version.  Install it into the TFTP tree for
 # netbooting.
@@ -146,9 +151,10 @@
 # architecture $1 and install it into the TFTP directory hierarchy.
 update_install_files() {
     local arch=$1 release=$2
-    local files=$(compose_installer_download_files $arch $release)
-    local url=$(compose_installer_download_url $arch $release)
-    local file
+    local files file url
+
+    files=$(compose_installer_download_files $arch $release)
+    url=$(compose_installer_download_url $arch $release)
 
     mkdir "install"
     pushd "install" >/dev/null