lxc-ubuntu fails if no name is provided

Bug #988301 reported by Thomas Herve
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxc (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

If I call lxc-ubuntu without providing the name parameter, it fails because some parameters get shifted in the script:

/usr/lib/lxc/templates/lxc-ubuntu -p vm
debootstrap is /usr/sbin/debootstrap
Checking cache download in /var/cache/lxc/precise/rootfs-i386 ...
Copy /var/cache/lxc/precise/rootfs-i386 to vm/rootfs ...
Copying rootfs to vm/rootfs ...
/usr/lib/lxc/templates/lxc-ubuntu: line 280: [: =: unary operator expected
/usr/lib/lxc/templates/lxc-ubuntu: line 285: [: =: unary operator expected
grep: vm/config: No such file or directory
/usr/lib/lxc/templates/lxc-ubuntu: line 454: [: -eq: unary operator expected

Passing -n foo doesn't produce that error.

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

Thanks for reporting this bug.

lxc-ubuntu is however not to be called directly. Please use

lxc-create -t ubuntu

instead.. Calling 'lxc-create -t ubuntu' without the '-n name' does show a proper usage message.

(This design should be changed to make the templates not directly callable)

Changed in lxc (Ubuntu):
status: New → Won't Fix
Revision history for this message
Thomas Herve (therve) wrote :

Thanks for info!

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.