 2405 Vagrant Cascadian	2012-11-18
      Fix dashism using "local -" by saving flags and restoring them later.
      http://bugs.debian.org/693499

 2404 Vagrant Cascadian	2012-11-18
      Fix dashism using "local -" by saving flags and restoring them later.
      http://bugs.debian.org/693496

=== modified file 'client/share/ltsp/update-kernels'
--- old/client/share/ltsp/update-kernels	2012-08-20 23:05:03 +0000
+++ new/client/share/ltsp/update-kernels	2012-11-18 21:19:26 +0000
@@ -51,7 +51,9 @@
 # Distros are required to set e.g. KERNEL_PREFIX="vmlinuz-*', KERNEL_SUFFIX="".
 # The * goes where the version is expected to go.
 kernel_versions() {
-    local - kernels arch loop_kernels kernel
+    local orig_flags kernels arch loop_kernels kernel
+    # Save values of flags, and restore them later.
+    orig_flags=$(set +o)
 
     # Disable glob expansion for this function
     set -f
@@ -72,6 +74,7 @@
             esac
         done
     done | sort -frV | awk '{ print $2 }'
+    eval "$orig_flags"
 }
 
 # This also sources vendor functions and .conf file settings

=== modified file 'server/ltsp-update-image'
--- old/server/ltsp-update-image	2012-11-17 07:05:52 +0000
+++ new/server/ltsp-update-image	2012-11-18 21:19:25 +0000
@@ -53,8 +53,9 @@
 
 trap_cleanup() {
     # Don't stop on errors within this function.
-    # local - means "restore flags on function exit".
-    local -
+    # Save and restore flags in a way that works with dash and bash.
+    local orig_flags
+    orig_flags=$(set +o)
     set +e
 
     # Stop trapping
@@ -65,6 +66,7 @@
     rmdir "$cu_rofs"
     rmdir "$cu_base"
     unlock_package_management
+    eval "$orig_flags"
 }
 
 # Get a sorted list of all "real" mount points under $chroot,

