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