5 |
INHERITS+=" systemd" |
INHERITS+=" systemd" |
6 |
|
|
7 |
DEPEND="${DEPEND} |
DEPEND="${DEPEND} |
8 |
>= sys-apps/systemd-208" |
>= sys-apps/systemd-230" |
9 |
|
|
10 |
SDEPEND="${SDEPEND} |
SDEPEND="${SDEPEND} |
11 |
>= dev-util/pkgconfig-0.27" |
>= dev-util/pkgconfig-0.27" |
27 |
pkg-config systemd --variable=systemdsystemunitdir |
pkg-config systemd --variable=systemdsystemunitdir |
28 |
} |
} |
29 |
|
|
30 |
|
mget-systemd-user-unit-dir() |
31 |
|
{ |
32 |
|
pkg-config systemd --variable=systemduserunitdir |
33 |
|
} |
34 |
|
|
35 |
mget-systemd-util-dir() |
mget-systemd-util-dir() |
36 |
{ |
{ |
37 |
pkg-config systemd --variable=systemdutildir |
pkg-config systemd --variable=systemdutildir |
42 |
pkg-config systemd --variable=systemdsystempresetdir |
pkg-config systemd --variable=systemdsystempresetdir |
43 |
} |
} |
44 |
|
|
45 |
|
mget-systemd-tmpfilesdir() |
46 |
|
{ |
47 |
|
pkg-config systemd --variable=tmpfilesdir |
48 |
|
} |
49 |
|
|
50 |
|
mget-systemd-sysusersdir() |
51 |
|
{ |
52 |
|
pkg-config systemd --variable=sysusersdir |
53 |
|
} |
54 |
|
|
55 |
|
mget-systemd-sysctldir() |
56 |
|
{ |
57 |
|
pkg-config systemd --variable=sysctldir |
58 |
|
} |
59 |
|
|
60 |
# installs systemd units |
# installs systemd units |
61 |
# minstallunit /path/to/unit-file {destfilename} |
# minstallunit /path/to/unit-file {destfilename} |
62 |
minstallunit() |
minstallunit() |
95 |
{ |
{ |
96 |
local tmpdfile |
local tmpdfile |
97 |
local file |
local file |
98 |
|
local tmpfilesdir="$(mget-systemd-tmpfilesdir)" |
99 |
|
|
100 |
[[ -z "$1" ]] && die "No tmpd file given" |
[[ -z "$1" ]] && die "No tmpd file given" |
101 |
|
|
115 |
fi |
fi |
116 |
|
|
117 |
# needed directory |
# needed directory |
118 |
minstalldir /etc/tmpfiles.d || die |
minstalldir ${tmpfilesdir} || die |
119 |
|
|
120 |
# install our tmpdfile |
# install our tmpdfile |
121 |
minstallfile ${file} /etc/tmpfiles.d/${tmpdfile} || die |
minstallfile ${file} ${tmpfilesdir}/${tmpdfile} || die |
122 |
} |
} |