mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-17 18:06:59 +02:00
eclass: Sync systemd.eclass with upstream
This commit is contained in:
parent
9a2855f189
commit
215d9bda8b
@ -240,6 +240,8 @@ systemd_install_serviced() {
|
|||||||
# @FUNCTION: systemd_dotmpfilesd
|
# @FUNCTION: systemd_dotmpfilesd
|
||||||
# @USAGE: <tmpfilesd>...
|
# @USAGE: <tmpfilesd>...
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
|
# Deprecated in favor of tmpfiles.eclass.
|
||||||
|
#
|
||||||
# Install systemd tmpfiles.d files. Uses doins, thus it is fatal
|
# Install systemd tmpfiles.d files. Uses doins, thus it is fatal
|
||||||
# in EAPI 4 and non-fatal in earlier EAPIs.
|
# in EAPI 4 and non-fatal in earlier EAPIs.
|
||||||
systemd_dotmpfilesd() {
|
systemd_dotmpfilesd() {
|
||||||
@ -260,6 +262,8 @@ systemd_dotmpfilesd() {
|
|||||||
# @FUNCTION: systemd_newtmpfilesd
|
# @FUNCTION: systemd_newtmpfilesd
|
||||||
# @USAGE: <old-name> <new-name>.conf
|
# @USAGE: <old-name> <new-name>.conf
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
|
# Deprecated in favor of tmpfiles.eclass.
|
||||||
|
#
|
||||||
# Install systemd tmpfiles.d file under a new name. Uses newins, thus it
|
# Install systemd tmpfiles.d file under a new name. Uses newins, thus it
|
||||||
# is fatal in EAPI 4 and non-fatal in earlier EAPIs.
|
# is fatal in EAPI 4 and non-fatal in earlier EAPIs.
|
||||||
systemd_newtmpfilesd() {
|
systemd_newtmpfilesd() {
|
||||||
@ -435,6 +439,8 @@ systemd_is_booted() {
|
|||||||
# @FUNCTION: systemd_tmpfiles_create
|
# @FUNCTION: systemd_tmpfiles_create
|
||||||
# @USAGE: <tmpfilesd> ...
|
# @USAGE: <tmpfilesd> ...
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
|
# Deprecated in favor of tmpfiles.eclass.
|
||||||
|
#
|
||||||
# Invokes systemd-tmpfiles --create with given arguments.
|
# Invokes systemd-tmpfiles --create with given arguments.
|
||||||
# Does nothing if ROOT != / or systemd-tmpfiles is not in PATH.
|
# Does nothing if ROOT != / or systemd-tmpfiles is not in PATH.
|
||||||
# This function should be called from pkg_postinst.
|
# This function should be called from pkg_postinst.
|
||||||
@ -448,7 +454,7 @@ systemd_tmpfiles_create() {
|
|||||||
|
|
||||||
[[ ${EBUILD_PHASE} == postinst ]] || die "${FUNCNAME}: Only valid in pkg_postinst"
|
[[ ${EBUILD_PHASE} == postinst ]] || die "${FUNCNAME}: Only valid in pkg_postinst"
|
||||||
[[ ${#} -gt 0 ]] || die "${FUNCNAME}: Must specify at least one filename"
|
[[ ${#} -gt 0 ]] || die "${FUNCNAME}: Must specify at least one filename"
|
||||||
[[ ${ROOT} == / ]] || return 0
|
[[ ${ROOT:-/} == / ]] || return 0
|
||||||
type systemd-tmpfiles &> /dev/null || return 0
|
type systemd-tmpfiles &> /dev/null || return 0
|
||||||
systemd-tmpfiles --create "${@}"
|
systemd-tmpfiles --create "${@}"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user