summaryrefslogtreecommitdiff
path: root/systemctl.vala
diff options
context:
space:
mode:
Diffstat (limited to 'systemctl.vala')
-rw-r--r--systemctl.vala17
1 files changed, 17 insertions, 0 deletions
diff --git a/systemctl.vala b/systemctl.vala
index a0237bb734..feacdb2b7b 100644
--- a/systemctl.vala
+++ b/systemctl.vala
@@ -81,6 +81,7 @@ int main (string[] args) {
" cancel [JOB...] Cancel one or more jobs\n" +
" start [NAME...] Start on or more units\n" +
" stop [NAME...] Stop on or more units\n" +
+ " enter [NAME] Start one unit and stop all others\n" +
" restart [NAME...] Restart on or more units\n" +
" reload [NAME...] Reload on or more units\n" +
" monitor Monitor unit/job changes\n" +
@@ -214,6 +215,22 @@ int main (string[] args) {
u.reload(mode);
}
+ } else if (args[1] == "isolate") {
+
+ if (args.length != 3) {
+ stderr.printf("Missing argument.\n");
+ return 1;
+ }
+
+ ObjectPath p = manager.get_unit(args[2]);
+
+ Unit u = bus.get_object(
+ "org.freedesktop.systemd1",
+ p,
+ "org.freedesktop.systemd1.Unit") as Unit;
+
+ u.start("isolate");
+
} else if (args[1] == "monitor") {
manager.subscribe();