Skip to content
Closed
Show file tree
Hide file tree
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
27 changes: 13 additions & 14 deletions core-services/02-udev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,17 @@

[ -n "$VIRTUALIZATION" ] && return 0

if [ -x /usr/lib/systemd/systemd-udevd ]; then
_udevd=/usr/lib/systemd/systemd-udevd
elif [ -x /sbin/udevd -o -x /bin/udevd ]; then
_udevd=udevd
else
msg_warn "cannot find udevd!"
fi
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume loosing this systemd-specific file name and path is OK (not that I really personally care)

msg "Starting device manager and waiting for devices to settle..."
case $CONFIG_DEV in
udevd)
udevd --daemon
udevadm trigger --action=add --type=subsystems
udevadm trigger --action=add --type=devices
udevadm settle
;;

if [ -n "${_udevd}" ]; then
msg "Starting udev and waiting for devices to settle..."
${_udevd} --daemon
udevadm trigger --action=add --type=subsystems
udevadm trigger --action=add --type=devices
udevadm settle
fi
mdevd)
mdevd & pid_mdevd=$!
mdevd-coldplug
;;
esac
11 changes: 11 additions & 0 deletions core-services/99-cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,14 @@ if [ ! -e /var/log/btmp ]; then
fi
install -dm1777 /tmp/.X11-unix /tmp/.ICE-unix
rm -f /etc/nologin /forcefsck /forcequotacheck /fastboot

msg "Killing device manager to make way for service..."
case $CONFIG_DEV in
udevd)
udevadm control --exit
;;

mdevd)
kill "$pid_mdevd"
;;
esac
5 changes: 5 additions & 0 deletions rc.conf
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,8 @@
# RNG, for example if you plan to replicate this file system image and do not
# have the wherewithal to first delete the contents of /var/lib/seedrng.
#SEEDRNG_SKIP_CREDIT=false

# The device manager to run during the init process. This is killed once boot
# is complete for a supervised version to take its place. Valid values are
# currently 'mdevd' or 'udevd' (default).
CONFIG_DEV=udevd
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd change the variable name to CONFIG_DEVD, or something like that, as I think the _DEV suffix would imply a device. But that's bikeshedding, feel free to ignore.

4 changes: 0 additions & 4 deletions shutdown.d/60-udev.sh

This file was deleted.