summaryrefslogtreecommitdiff
path: root/user/eudev/setup-udev
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2018-07-05 01:08:52 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-07-05 01:08:52 -0500
commit518c42acde0f5889d0dc4b41a55a2c9356c3d6cd (patch)
tree5e9333f39fedefbaabe6113a206fef44096d838c /user/eudev/setup-udev
parent7b2a62c315b590bb9514735c3aef209e1dafaa92 (diff)
downloadpackages-518c42acde0f5889d0dc4b41a55a2c9356c3d6cd.tar.gz
packages-518c42acde0f5889d0dc4b41a55a2c9356c3d6cd.tar.bz2
packages-518c42acde0f5889d0dc4b41a55a2c9356c3d6cd.tar.xz
packages-518c42acde0f5889d0dc4b41a55a2c9356c3d6cd.zip
user/eudev: fix up and merge udev-init-scripts in (why was that ever separate?)
Diffstat (limited to 'user/eudev/setup-udev')
-rw-r--r--user/eudev/setup-udev28
1 files changed, 28 insertions, 0 deletions
diff --git a/user/eudev/setup-udev b/user/eudev/setup-udev
new file mode 100644
index 000000000..a4d0aacf0
--- /dev/null
+++ b/user/eudev/setup-udev
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+while getopts "hn" opt; do
+ case "$opt" in
+ h) echo "remove mdev and enable udev from boot"
+ echo "usage: $0 [-n]"
+ echo "options:"
+ echo " -n Do not start udev"
+ ;;
+ n) dryrun=1
+ ;;
+ esac
+done
+
+rm -f /etc/runlevels/sysinit/hwdrivers /etc/runlevels/sysinit/mdev
+
+for i in udev-trigger udev udev-postmount; do
+ if ! [ -e /etc/runlevels/sysinit/$i ]; then
+ ln -s /etc/init.d/$i /etc/runlevels/sysinit/$i
+ fi
+done
+
+if [ -z "$dryrun" ] && ! rc-service --quiet udev status; then
+ rc-service udev start
+ rc-service udev-postmount start
+ rc-service udev-trigger start
+ rc-service udev-settle start
+fi