[Libguestfs] [PATCH 2/2] p2v: add a Shutdown action (RHBZ#1642044)

Richard W.M. Jones rjones at redhat.com
Tue Nov 6 11:37:16 UTC 2018


On Tue, Nov 06, 2018 at 10:17:57AM +0000, Richard W.M. Jones wrote:
> On Tue, Nov 06, 2018 at 10:09:19AM +0000, Richard W.M. Jones wrote:
> > On Mon, Nov 05, 2018 at 06:31:25PM +0100, Pino Toscano wrote:
> > > +static void
> > > +shutdown_clicked (GtkWidget *w, gpointer data)
> > > +{
> > > +  if (!is_iso_environment)
> > > +    return;
> > > +
> > > +  sync ();
> > > +  sleep (2);
> > > +  ignore_value (system ("/sbin/shutdown"));
> > > +}
> > > +
> > 
> > The shutdown button doesn't actually work[1].  I don't
> > know why because /sbin/shutdown exists.
> 
> Oh I see, it's because running just the shutdown command simply
> schedules a shutdown in future.  You have to use ‘shutdown now’.  BTW
> I don't believe it's necessary to use the full path (nor in the reboot
> command either).

Actually the full path is there for RHEL 5 compatibility so it
is required.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://people.redhat.com/~rjones/virt-df/




More information about the Libguestfs mailing list