summaryrefslogtreecommitdiff
path: root/src/ostree/ot-admin-builtin-upgrade.c
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2016-03-18 16:46:42 -0400
committerColin Walters <walters@verbum.org>2016-03-23 10:26:01 -0400
commit614483ecd174c3e5f9c048ebd517d186c88caa89 (patch)
tree30ae02cea7800e4cd1dc9ca839b7f0d8487ef561 /src/ostree/ot-admin-builtin-upgrade.c
parentafb6105a51478b7f2ff7427f14fdfc17119df0ed (diff)
downloadostree-614483ecd174c3e5f9c048ebd517d186c88caa89.tar.gz
Use GSubprocess instead of GSSubprocess (libgsystem removal)
Since we hard-depend on GLib 2.40, we can start using GSubprocess. This is part of dropping our dependency on libgsystem, which is deprecated in favor of libglnx (as well as migrating things to GLib).
Diffstat (limited to 'src/ostree/ot-admin-builtin-upgrade.c')
-rw-r--r--src/ostree/ot-admin-builtin-upgrade.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/ostree/ot-admin-builtin-upgrade.c b/src/ostree/ot-admin-builtin-upgrade.c
index 90d0ce98..5d4796ac 100644
--- a/src/ostree/ot-admin-builtin-upgrade.c
+++ b/src/ostree/ot-admin-builtin-upgrade.c
@@ -133,16 +133,13 @@ ot_admin_builtin_upgrade (int argc, char **argv, GCancellable *cancellable, GErr
}
else
{
- g_autoptr(GFile) real_sysroot = g_file_new_for_path ("/");
-
if (!ostree_sysroot_upgrader_deploy (upgrader, cancellable, error))
goto out;
- if (opt_reboot && g_file_equal (ostree_sysroot_get_path (sysroot), real_sysroot))
+ if (opt_reboot)
{
- gs_subprocess_simple_run_sync (NULL, GS_SUBPROCESS_STREAM_DISPOSITION_INHERIT,
- cancellable, error,
- "systemctl", "reboot", NULL);
+ if (!ot_admin_execve_reboot (sysroot, error))
+ goto out;
}
}