aboutsummaryrefslogblamecommitdiffstats
path: root/main/eudev/setup-udev
blob: 1b1c5664bca997612eb902b5ae5a01742eb365a5 (plain) (tree)
1
2
3
4
5



                          
                                                            










                                                                  


                                                                     
          
    






                                                             
#!/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 sysinit/udev-trigger sysinit/udev default/udev-postmount; do
	if ! [ -e /etc/runlevels/$i ]; then
		ln -s /etc/init.d/${i#*/} /etc/runlevels/$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