[systemd-devel] [PATCH] Add support for transient presets, applied on every boot.
Lennart Poettering
lennart at poettering.net
Wed Feb 11 12:43:28 PST 2015
On Thu, 05.02.15 16:11, Dimitri John Ledkov (dimitri.j.ledkov at intel.com) wrote:
>
> -static int get_config_path(UnitFileScope scope, bool runtime, const char *root_dir, char **ret) {
> +static int get_config_path(UnitFileScope scope, bool runtime, bool preset, const char *root_dir, char **ret) {
> char *p = NULL;
> int r;
>
> @@ -71,7 +71,10 @@ static int get_config_path(UnitFileScope scope, bool runtime, const char *root_d
> case UNIT_FILE_SYSTEM:
>
> if (runtime)
> - p = path_join(root_dir, "/run/systemd/system", NULL);
> + if (preset)
> + p = path_join(root_dir, "/run/systemd/system-preset-transient", NULL);
> + else
> + p = path_join(root_dir,
> "/run/systemd/system", NULL);
Hmm, shouldn't we just apply this directly to /run/systemd/system?
There's no real need to keep this separate?
I mean if the user shall be able to undo changes made by these presets
with "systemctl --runtime disable" it would be good not to introduce a
new dir for all of this...
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list