diff --git a/p2v/launch-virt-p2v.in b/p2v/launch-virt-p2v.in index cb8ddf38e..3e4f1f99b 100755 --- a/p2v/launch-virt-p2v.in +++ b/p2v/launch-virt-p2v.in @@ -1,6 +1,6 @@ #!/bin/bash - # @configure_input@ -# (C) Copyright 2014 Red Hat Inc. +# (C) Copyright 2014-2016 Red Hat Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -18,13 +18,22 @@ # This normally runs from systemd which deals with logging. -# To save one script, invoke self again to run the window manager -# and virt-p2v. -if [ "$1" = "run" ]; then - cd / - metacity & - nm-applet & +# Are we running in GUI or non-GUI mode? This is controlled by the +# presence of "p2v.server" on the kernel command line. +cmdline=$(