Skip to content

Commit

Permalink
Merge pull request #595 from monstermunchkin/fixes/systemd
Browse files Browse the repository at this point in the history
systemd-generator: Handle /bin/udevadm
  • Loading branch information
stgraber authored Jan 5, 2022
2 parents c3c7c40 + 5018a22 commit 3a40352
Showing 1 changed file with 11 additions and 2 deletions.
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

0 comments on commit 3a40352

Please sign in to comment.