syntax error in vzmigrate script (line 382)

Bug #348850 reported by Guido Nickels
4
Affects Status Importance Assigned to Milestone
vzctl (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: vzctl

Hi!

When trying to do an online migration, the vzmigrate script throws the following error: "[: 386: missing ]"

Reason: In line 382 of /usr/sbin/vzmigrate script, you will find the following code:

if [ $? != 20 && $? != 21 && $? != 0 ]; then

This is not working because test doesn't accept "&&".

Fix:

if [ $? != 20 -a $? != 21 -a $? != 0 ]; then

or:

if [ $? != 20 ] && [ $? != 21 ] && [ $? != 0 ]; then

As this seems to break online migration completely, I consider it quite important to be fixed.

Regards,

Guido

Revision history for this message
Guido Nickels (gsn) wrote :
Daniel Hahler (blueyed)
Changed in vzctl:
assignee: nobody → blueyed
status: New → In Progress
Revision history for this message
Daniel Hahler (blueyed) wrote :

This is fixed in vzctl 3.0.22-14ubuntu2 (in Jaunty) already, which uses:
  if [ $? != 20 ] && [ $? != 21 ] && [ $? != 0 ]; then

Thanks for reporting this bug anyway!

Changed in vzctl:
assignee: blueyed → nobody
importance: Undecided → Medium
status: In Progress → 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.