| 1 | # | ||||||||||||||
| 2 | # This file is part of Config-Model-Systemd | ||||||||||||||
| 3 | # | ||||||||||||||
| 4 | # This software is Copyright (c) 2008-2026 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 | 3 | $Config::Model::Backend::Systemd::Layers::VERSION = '0.261.3'; | |||||||||||||
| 12 | 3 | ▶ | use Mouse::Role; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 13 | |||||||||||||||
| 14 | |||||||||||||||
| 15 | 49 | ▶ | sub default_directories { | ||||||||||||
|
Subroutine
default_directories: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||||||
| 16 | 49 | my $self = shift ; | |||||||||||||
| 17 | 49 | my $app = $self->node->instance->application; | |||||||||||||
| 18 | |||||||||||||||
| 19 | 49 | my @layers ; | |||||||||||||
| 20 | 49 | ▶ | if ($app eq 'systemd-user') { | ||||||||||||
|
Branch: 2 branches
| |||||||||||||||
| 21 | 21 | @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 | @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 | 49 | return @layers; | |||||||||||||
| 44 | } | ||||||||||||||
| 45 | |||||||||||||||
| 46 | 3 | 1; | |||||||||||||
| 47 | |||||||||||||||
| 48 | # ABSTRACT: Role that provides Systemd default directories | ||||||||||||||
| 49 | |||||||||||||||
| 50 | __END__ | ||||||||||||||