systemctl.vala revision e99e38bbdcca3fe5956823bdb3d38544ccf93221
/***
This file is part of systemd.
Copyright 2010 Lennart Poettering
under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
systemd is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with systemd; If not, see <http://www.gnu.org/licenses/>.
***/
}
if (r != 0)
return r;
}
public void on_unit_changed(Unit u) {
}
"org.freedesktop.systemd1",
path,
u.changed += on_unit_changed;
/* FIXME: We leak memory here */
u.ref();
}
public void on_job_changed(Job j) {
}
"org.freedesktop.systemd1",
path,
j.changed += on_job_changed;
/* FIXME: We leak memory here */
j.ref();
}
}
}
static const OptionEntry entries[] = {
{ "replace", 0, 0, OptionArg.NONE, out replace, "When installing a new job, replace existing conflicting ones", null },
{ null }
};
"Commands:\n" +
" list-units List units\n" +
" list-jobs List jobs\n" +
" clear-jobs Cancel all jobs\n" +
" load [NAME...] Load one or more units\n" +
" 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" +
" dump Dump server status\n" +
" snapshot [NAME] Create a snapshot\n" +
" daemon-reload Reload daemon configuration\n" +
" daemon-reexecute Reexecute daemon\n" +
" show-environment Dump environment\n" +
" set-environment [NAME=VALUE...] Set one or more environment variables\n" +
" unset-environment [NAME...] Unset one or more environment variables\n");
try {
} catch (GLib.OptionError e) {
}
try {
"org.freedesktop.systemd1",
"/org/freedesktop/systemd1",
uint n = 0;
continue;
continue;
if (i.job_id != 0)
n++;
}
if (all)
else
return 1;
}
return 1;
}
return 1;
}
"org.freedesktop.systemd1",
p,
j.cancel();
}
return 1;
}
"org.freedesktop.systemd1",
p,
}
return 1;
}
"org.freedesktop.systemd1",
p,
u.start("isolate");
l.run();
"org.freedesktop.systemd1",
p,
else {
return 1;
}
}
return 0;
}