Fix incorrect timeout handling of do_reboot_and_check()
Currently do_reboot_and_check() is decreasing timeout variable even if
it is set to -1, so running 'lxc-stop --reboot --timeout=-1 ...' will
exits immediately at end of second iteration of loop, without waiting
container reboot.
Also, there is no need to call gettimeofday if timeout is set to -1, so
these statements should be evaluated only when timeout is enabled.
Signed-off-by:
Yuto KAWAMURA(kawamuray) <kawamuray.dadada@gmail.com>
Acked-by:
Serge E. Hallyn <serge.hallyn@ubuntu.com>
Showing
Please
register
or
sign in
to comment