Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

systemd-generator: Handle /bin/udevadm #595

Merged
merged 1 commit into from
Jan 5, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions distrobuilder/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -667,8 +667,17 @@ fix_systemd_mask() {
# fix_systemd_udev_trigger overrides the systemd-udev-trigger.service to match the latest version
# of the file which uses "ExecStart=-" instead of "ExecStart=".
fix_systemd_udev_trigger() {
cmd=/usr/bin/udevadm
! [ -e "${cmd}" ] && cmd=/sbin/udevadm
cmd=
if [ -f /usr/bin/udevadm ]; then
cmd=/usr/bin/udevadm
elif [ -f /sbin/udevadm ]; then
cmd=/sbin/udevadm
elif [ -f /bin/udevadm ]; then
cmd=/bin/udevadm
else
return 0
fi

mkdir -p /run/systemd/system/systemd-udev-trigger.service.d
cat <<-EOF > /run/systemd/system/systemd-udev-trigger.service.d/zzz-lxc-override.conf
[Service]
Expand Down