# udev needs /run
[[ -d "${INSTALL_ROOT}/run" ]] || install -m 755 -d "$INSTALL_ROOT/run" &&

local file UDEV_CFG="$INSTALL_ROOT/etc/udev" &&

install -m 755 -d "$INSTALL_ROOT/sys" \
                  "$UDEV_CFG/rules.d" &&

for file in $SPELL_DIRECTORY/rules/*; do
  install_config_file $file "$UDEV_CFG/rules.d/$(basename $file)"
done &&

# Aliases for modprobe
install -m 755 -d "$INSTALL_ROOT/etc/modprobe.d" &&

install_config_file "$SPELL_DIRECTORY/modprobe.aliases" \
                    "$INSTALL_ROOT/etc/modprobe.d/udev.conf" &&

default_install
