3c7b763f60
tested on arch linux and ubuntu
21 lines
483 B
Bash
21 lines
483 B
Bash
# vim: set ft=sh:
|
|
# shellcheck shell=sh
|
|
#
|
|
# https://shellcheck.net/wiki/SC2154
|
|
# shellcheck disable=2154
|
|
|
|
copy_exec udevadm
|
|
|
|
# FIXME
|
|
if [ -h /lib/systemd/systemd-udevd ]; then
|
|
ln -s udevadm "${tmpdir}/bin/systemd-udevd"
|
|
else
|
|
copy_exec /lib/systemd/systemd-udevd
|
|
fi
|
|
|
|
mkdir -p "${tmpdir}/lib/udev/rules.d"
|
|
cat > "${tmpdir}/lib/udev/rules.d/device.rules" << EOF
|
|
SUBSYSTEMS=="block", ACTION=="add", RUN+="/sbin/helper"
|
|
ENV{MODALIAS}=="?*", ACTION=="add", RUN+="/sbin/helper"
|
|
EOF
|