summaryrefslogtreecommitdiff
path: root/src/install.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-07-25 04:58:02 +0200
committerLennart Poettering <lennart@poettering.net>2011-07-25 04:58:02 +0200
commit729e3769c32242bbba26ea96900be005d52ce438 (patch)
treea8a6234044790254e3834e1e67971df93613b918 /src/install.c
parent4b7a6af440ee1a957fd8fe1c6ca3b7f310fdf77c (diff)
systemctl: hook up new install logic
This adds a number of new options to systemctl, for presets, reenabling, masking/unmask, and runtime operations.
Diffstat (limited to 'src/install.c')
-rw-r--r--src/install.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/install.c b/src/install.c
index b37bbbdc5a..b843ee156b 100644
--- a/src/install.c
+++ b/src/install.c
@@ -126,8 +126,6 @@ static int add_file_change(
UnitFileChange *c;
unsigned i;
- assert(type >= 0);
- assert(type < _UNIT_FILE_CHANGE_TYPE_MAX);
assert(path);
assert(!changes == !n_changes);
@@ -1414,6 +1412,10 @@ int unit_file_enable(
goto finish;
}
+ /* This will return the number of symlink rules that were
+ supposed to be created, not the ones actually created. This is
+ useful to determine whether the passed files hat any
+ installation data at all. */
r = install_context_apply(&c, &paths, config_path, root_dir, force, changes, n_changes);
finish:
@@ -1514,6 +1516,7 @@ int unit_file_reenable(
r = remove_marked_symlinks(remove_symlinks_to, config_path, changes, n_changes);
+ /* Returns number of symlinks that where supposed to be installed. */
q = install_context_apply(&c, &paths, config_path, root_dir, force, changes, n_changes);
if (r == 0)
r = q;
@@ -1763,6 +1766,7 @@ int unit_file_preset(
if (r == 0)
r = q;
+ /* Returns number of symlinks that where supposed to be installed. */
q = install_context_apply(&plus, &paths, config_path, root_dir, force, changes, n_changes);
if (r == 0)
r = q;