diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-01-27 23:11:31 -0500 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-01-29 19:01:41 -0500 |
commit | 7584d236eac91f9b7128b1eb08bddf18be2bce9f (patch) | |
tree | 734baeee461940fbcb12b13979d1d2541c3a837a /src/shared/install.h | |
parent | 0591220f339c313761f9a208e88fb719db566993 (diff) |
install: allow specifiers in WantedBy/RequiredBy/Alias
This allows one templated unit to refer to another templated unit
at installation time.
Examples:
> grep WantedBy ~/.config/systemd/user/mpop@.timer
WantedBy=services@%i.target
> srv disable mpop@iit.timer
rm '/home/alxchk/.config/systemd/user/services@iit.target.wants/mpop@iit.timer'
> srv enable mpop@iit.timer
ln -s '/home/alxchk/.config/systemd/user/mpop@.timer' '/home/alxchk/.config/systemd/user/services@iit.target.wants/mpop@iit.timer'
Based-on-patch-by: Oleksii Shevchuk <alxchk@gmail.com>
Diffstat (limited to 'src/shared/install.h')
-rw-r--r-- | src/shared/install.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/shared/install.h b/src/shared/install.h index 55249914b1..5a351254bb 100644 --- a/src/shared/install.h +++ b/src/shared/install.h @@ -63,6 +63,15 @@ typedef struct UnitFileList { UnitFileState state; } UnitFileList; +typedef struct { + char *name; + char *path; + + char **aliases; + char **wanted_by; + char **required_by; +} InstallInfo; + int unit_file_enable(UnitFileScope scope, bool runtime, const char *root_dir, char *files[], bool force, UnitFileChange **changes, unsigned *n_changes); int unit_file_disable(UnitFileScope scope, bool runtime, const char *root_dir, char *files[], UnitFileChange **changes, unsigned *n_changes); int unit_file_reenable(UnitFileScope scope, bool runtime, const char *root_dir, char *files[], bool force, UnitFileChange **changes, unsigned *n_changes); |