mirror of
https://github.com/flatcar/scripts.git
synced 2026-01-30 12:52:18 +01:00
overlay coreos/config: Add Flatcar modifications for sys-apps/dbus
This commit is contained in:
parent
3b382acf35
commit
da9c911588
41
sdk_container/src/third_party/coreos-overlay/coreos/config/env/sys-apps/dbus
vendored
Normal file
41
sdk_container/src/third_party/coreos-overlay/coreos/config/env/sys-apps/dbus
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
# A hack to ignore processing of dbus.conf tmpfiles config file.
|
||||
if [[ -z ${flatcar_hacked_systemd_tmpfiles:-} ]]; then
|
||||
flatcar_hacked_systemd_tmpfiles=$(command -v systemd-tmpfiles)
|
||||
fi
|
||||
systemd-tmpfiles() {
|
||||
local -a args=()
|
||||
local f has_config_file=''
|
||||
for f; do
|
||||
if [[ ${f} != dbus.conf ]]; then
|
||||
args+=( "${f}" )
|
||||
if [[ ${f} = *.conf ]]; then
|
||||
has_config_file=x
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if [[ -n ${has_config_file} ]]; then
|
||||
"${flatcar_hacked_systemd_tmpfiles}" "${args[@]}"
|
||||
fi
|
||||
}
|
||||
|
||||
# Hacks to avoid generating /etc/machine-id - we do it elsewhere, on
|
||||
# our own.
|
||||
if [[ -z ${flatcar_hacked_dbus_uuidgen:-} ]]; then
|
||||
flatcar_hacked_dbus_uuidgen=$(command -v dbus-uuidgen)
|
||||
fi
|
||||
dbus-uuidgen() {
|
||||
if [[ ${1:-} = "--ensure=${EROOT}/etc/machine-id" ]]; then
|
||||
return 0
|
||||
fi
|
||||
"${flatcar_hacked_dbus_uuidgen}" "${@}"
|
||||
}
|
||||
|
||||
if [[ -z ${flatcar_hacked_ln:-} ]]; then
|
||||
flatcar_hacked_ln=$(command -v ln)
|
||||
fi
|
||||
ln() {
|
||||
if [[ ${1:-} = '-sf' && ${2:-} = "${EPREFIX}"/etc/machine-id && ${3:-} = "${EROOT}"/var/lib/dbus/machine-id ]]; then
|
||||
return 0
|
||||
fi
|
||||
"${flatcar_hacked_ln}" "${@}"
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user