Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 361404 Details for
Bug 458132
systemd.eclass: add support for ntp-units.d
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch rev1
0001-Add-systemd_enable_ntpunit-to-add-NTP-units.patch (text/plain), 2.08 KB, created by
Michał Górny
on 2013-10-20 06:35:08 UTC
(
hide
)
Description:
Patch rev1
Filename:
MIME Type:
Creator:
Michał Górny
Created:
2013-10-20 06:35:08 UTC
Size:
2.08 KB
patch
obsolete
>From fc268c179dbea3ca90d2845dc02ec3a4124b0c5e Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org> >Date: Sat, 19 Oct 2013 23:05:10 +0200 >Subject: [PATCH] Add systemd_enable_ntpunit() to add NTP units. > >Fixes: https://bugs.gentoo.org/show_bug.cgi?id=458132 >--- > eclass/systemd.eclass | 47 +++++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 47 insertions(+) > >diff --git a/eclass/systemd.eclass b/eclass/systemd.eclass >index c4623fb..1dad040 100644 >--- a/eclass/systemd.eclass >+++ b/eclass/systemd.eclass >@@ -218,6 +218,53 @@ systemd_enable_service() { > dosym ../"${service}" "${ud}"/"${target}".wants/"${destname}" > } > >+# @FUNCTION: systemd_enable_ntpunit >+# @USAGE: <NN-name> <service>... >+# @DESCRIPTION: >+# Add an NTP service provider to the list of implementations >+# in timedated. <NN-name> defines the newly-created ntp-units.d priority >+# and name, while the remaining arguments list service units that will >+# be added to that file. >+# >+# Uses doins, thus it is fatal in EAPI 4 and non-fatal in earlier >+# EAPIs. >+# >+# Doc: http://www.freedesktop.org/wiki/Software/systemd/timedated/ >+systemd_enable_ntpunit() { >+ debug-print-function ${FUNCNAME} "${@}" >+ if [[ ${#} -lt 2 ]]; then >+ die "Usage: systemd_enable_ntpunit <NN-name> <service>..." >+ fi >+ >+ local ntpunit_name=${1} >+ local services=( "${@:2}" ) >+ >+ if [[ ${ntpunit_name} != [0-9][0-9]-* ]]; then >+ die "ntpunit.d file must be named NN-name where NN are digits." >+ elif [[ ${ntpunit_name} == *.list ]]; then >+ die "The .list suffix is appended implicitly to ntpunit.d name." >+ fi >+ >+ local unitdir=$(systemd_get_unitdir) >+ local s >+ for s in "${services[@]}"; do >+ if [[ ! -f "${D}${unitdir}/${s}" ]]; then >+ die "ntp-units.d provider ${s} not installed (yet?) in \${D}." >+ fi >+ echo "${s}" >> "${T}"/${ntpunit_name}.list >+ done >+ >+ ( >+ insinto "$(_systemd_get_utildir)"/ntp-units.d >+ doins "${T}"/${ntpunit_name}.list >+ ) >+ local ret=${?} >+ >+ rm "${T}"/${ntpunit_name}.list || die >+ >+ return ${ret} >+} >+ > # @FUNCTION: systemd_with_unitdir > # @USAGE: [<configure-option-name>] > # @DESCRIPTION: >-- >1.8.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 458132
: 361404