| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
# |
|
2
|
|
|
|
|
|
|
# This file is part of Config-Model-Systemd |
|
3
|
|
|
|
|
|
|
# |
|
4
|
|
|
|
|
|
|
# This software is Copyright (c) 2008-2022 by Dominique Dumont. |
|
5
|
|
|
|
|
|
|
# |
|
6
|
|
|
|
|
|
|
# This is free software, licensed under: |
|
7
|
|
|
|
|
|
|
# |
|
8
|
|
|
|
|
|
|
# The GNU Lesser General Public License, Version 2.1, February 1999 |
|
9
|
|
|
|
|
|
|
# |
|
10
|
|
|
|
|
|
|
$Config::Model::Backend::Systemd::Layers::VERSION = '0.252.1'; |
|
11
|
|
|
|
|
|
|
use Mouse::Role; |
|
12
|
3
|
|
|
3
|
|
1681
|
|
|
|
3
|
|
|
|
|
8
|
|
|
|
3
|
|
|
|
|
27
|
|
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
my $self = shift ; |
|
15
|
|
|
|
|
|
|
my $app = $self->node->instance->application; |
|
16
|
48
|
|
|
48
|
1
|
142
|
|
|
17
|
48
|
|
|
|
|
616
|
my @layers ; |
|
18
|
|
|
|
|
|
|
if ($app eq 'systemd-user') { |
|
19
|
48
|
|
|
|
|
93
|
@layers = ( |
|
20
|
48
|
100
|
|
|
|
231
|
# paths documented by systemd-system.conf man page |
|
|
|
50
|
|
|
|
|
|
|
21
|
20
|
|
|
|
|
88
|
'/etc/systemd/user.conf.d/', |
|
22
|
|
|
|
|
|
|
'/run/systemd/user.conf.d/', |
|
23
|
|
|
|
|
|
|
'/usr/lib/systemd/user.conf.d/', |
|
24
|
|
|
|
|
|
|
# path found on Debian |
|
25
|
|
|
|
|
|
|
'/usr/lib/systemd/user/' |
|
26
|
|
|
|
|
|
|
); |
|
27
|
|
|
|
|
|
|
} |
|
28
|
|
|
|
|
|
|
elsif ($app !~ /file$/) { |
|
29
|
|
|
|
|
|
|
@layers = ( |
|
30
|
|
|
|
|
|
|
# paths documented by systemd-system.conf man page |
|
31
|
28
|
|
|
|
|
119
|
'/etc/systemd/system.conf.d/', |
|
32
|
|
|
|
|
|
|
'/run/systemd/system.conf.d/', |
|
33
|
|
|
|
|
|
|
'/lib/systemd/system.conf.d/', |
|
34
|
|
|
|
|
|
|
# not documented but used to symlink to real files |
|
35
|
|
|
|
|
|
|
'/etc/systemd/system/', |
|
36
|
|
|
|
|
|
|
# path found on Debian |
|
37
|
|
|
|
|
|
|
'/lib/systemd/system/', |
|
38
|
|
|
|
|
|
|
); |
|
39
|
|
|
|
|
|
|
} |
|
40
|
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
return @layers; |
|
42
|
|
|
|
|
|
|
} |
|
43
|
48
|
|
|
|
|
236
|
|
|
44
|
|
|
|
|
|
|
1; |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
# ABSTRACT: Role that provides Systemd default directories |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=pod |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=encoding UTF-8 |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 NAME |
|
54
|
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Config::Model::Backend::Systemd::Layers - Role that provides Systemd default directories |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 VERSION |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
version 0.252.1 |
|
60
|
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
package Config::Model::Backend::Systemd ; |
|
64
|
|
|
|
|
|
|
extends 'Config::Model::Backend::Any'; |
|
65
|
|
|
|
|
|
|
with 'Config::Model::Backend::Systemd::Layers'; |
|
66
|
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
68
|
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
Small role to provide Systemd default directories (user or system) to |
|
70
|
|
|
|
|
|
|
L<Config::Model::Backend::Systemd> and L<Config::Model::Backend::Systemd::Unit>. |
|
71
|
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 Methods |
|
73
|
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
=head2 default_directories |
|
75
|
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
Returns a list of default directory, depending on the application used (either |
|
77
|
|
|
|
|
|
|
C<systemd> or C<systemd-user>. |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head1 AUTHOR |
|
80
|
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
Dominique Dumont |
|
82
|
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
|
84
|
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
This software is Copyright (c) 2008-2022 by Dominique Dumont. |
|
86
|
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
This is free software, licensed under: |
|
88
|
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
The GNU Lesser General Public License, Version 2.1, February 1999 |
|
90
|
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=cut |