The -- option to lxc-start-ephemeral no longer works

Bug #954632 reported by Gary Poster
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxc (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

This fixes it:

=== modified file 'debian/local/lxc-start-ephemeral'
--- debian/local/lxc-start-ephemeral 2012-03-12 13:22:06 +0000
+++ debian/local/lxc-start-ephemeral 2012-03-14 01:10:20 +0000
@@ -100,6 +100,8 @@
         esac
 done

+COMMAND=$@
+COMMAND_LENGTH=$#
 LXC_USER=${LXC_USER:-`id -un`}

 # validation
@@ -193,7 +195,7 @@
     sudo lxc-start -n $LXC_NAME -d
     LXC_RUNNING=1

- if [ $# -gt 0 ]; then
+ if [ $COMMAND_LENGTH -gt 0 ]; then
         # when lxc-attach support arrives in the kernel, we can switch to
         # that
         delay=30
@@ -209,7 +211,7 @@
             # Repeatedly try to connect over SSH until we either succeed
             # or time out.
             for i in $(seq 1 30); do
- ssh -n -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null $LXC_KEY $LXC_USER@$IP_ADDRESS -- "$@"
+ ssh -n -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null $LXC_KEY $LXC_USER@$IP_ADDRESS -- "$COMMAND"
                 if [ ! 255 -eq $? ]; then
                     # If ssh returns 255 then its connection failed.
                     # Anything else is either success (status 0) or a

Related branches

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Thanks, Gary, I"ll include this patch in the next upload.

Changed in lxc (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lxc - 0.7.5-3ubuntu37

---------------
lxc (0.7.5-3ubuntu37) precise; urgency=low

  [Serge Hallyn]
  * 0057-update-manpages: update manual pages to reflect some new options.
  [Gary Poster]
  * lxc-start-ephemeral: fix broken use of '-- command' (LP: #954632)
 -- Serge Hallyn <email address hidden> Wed, 14 Mar 2012 10:52:44 -0500

Changed in lxc (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.