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" |
37 |
pkg-config systemd --variable=systemdsystempresetdir |
pkg-config systemd --variable=systemdsystempresetdir |
38 |
} |
} |
39 |
|
|
40 |
|
mget-systemd-tmpfilesdir() |
41 |
|
{ |
42 |
|
pkg-config systemd --variable=tmpfilesdir |
43 |
|
} |
44 |
|
|
45 |
|
mget-systemd-sysusersdir() |
46 |
|
{ |
47 |
|
pkg-config systemd --variable=sysusersdir |
48 |
|
} |
49 |
|
|
50 |
|
mget-systemd-sysctldir() |
51 |
|
{ |
52 |
|
pkg-config systemd --variable=sysctldir |
53 |
|
} |
54 |
|
|
55 |
# installs systemd units |
# installs systemd units |
56 |
# minstallunit /path/to/unit-file {destfilename} |
# minstallunit /path/to/unit-file {destfilename} |
57 |
minstallunit() |
minstallunit() |
90 |
{ |
{ |
91 |
local tmpdfile |
local tmpdfile |
92 |
local file |
local file |
93 |
|
local tmpfilesdir="$(mget-systemd-tmpfilesdir)" |
94 |
|
|
95 |
[[ -z "$1" ]] && die "No tmpd file given" |
[[ -z "$1" ]] && die "No tmpd file given" |
96 |
|
|
110 |
fi |
fi |
111 |
|
|
112 |
# needed directory |
# needed directory |
113 |
minstalldir /etc/tmpfiles.d || die |
minstalldir ${tmpfilesdir} || die |
114 |
|
|
115 |
# install our tmpdfile |
# install our tmpdfile |
116 |
minstallfile ${file} /etc/tmpfiles.d/${tmpdfile} || die |
minstallfile ${file} ${tmpfilesdir}/${tmpdfile} || die |
117 |
} |
} |