SHA256
1
0
forked from pool/systemd
systemd/boot.udev
Stephan Kulow a4cc02351c Accepting request 147543 from Base:System
- udevd: add missing ':' to getopt_long 'e'.
  add: 1007-udevd-add-missing-to-getopt_long-e.patch
- clean up systemd.spec, make it easy to see which are udev and
  systemd patches.
- make 'reload' and 'force-reload' LSB compliant (bnc#793936).

- udevd: add missing ':' to getopt_long 'e'.
  add: 1007-udevd-add-missing-to-getopt_long-e.patch
- clean up systemd.spec, make it easy to see which are udev and
  systemd patches. 
- make 'reload' and 'force-reload' LSB compliant (bnc#793936).

OBS-URL: https://build.opensuse.org/request/show/147543
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=119
2013-01-08 20:14:07 +00:00

75 lines
1.5 KiB
Bash

#!/bin/sh
#
### BEGIN INIT INFO
# Provides: boot.udev
# Required-Start:
# Required-Stop:
# Should-Start:
# Should-Stop:
# Default-Start: B
# Default-Stop:
# Short-Description: manage /dev and kernel device-events
# Description: udevd daemon to manage /dev and kernel device events
### END INIT INFO
. /etc/rc.status
PATH="/sbin:/bin:/usr/sbin:/usr/bin"
DAEMON="@@SYSTEMD@@/systemd-udevd"
UDEVADM="@@BINDIR@@/udevadm"
WRITERULE="@@PREFIX@@/write_dev_root_rule"
udev_timeout=180
case "$1" in
start)
# create /dev/root symlink with dynamic rule
if [ -x ${WRITERULE} ]; then
${WRITERULE} >/dev/null 2>&1 || true
fi
# start udevd
echo -n "Starting udevd: "
${DAEMON} --daemon
if [ $? -ne 0 ]; then
rc_status -v
rc_exit
fi
rc_status -v
# trigger events for all devices
echo -n "Loading drivers, configuring devices: "
${UDEVADM} trigger --type=subsystems --action=add
${UDEVADM} trigger --type=devices --action=add
# wait for events to finish
${UDEVADM} settle --timeout=$udev_timeout
rc_status -v
;;
stop)
echo -n "Stopping udevd: "
killproc ${DAEMON}
rc_status -v
;;
restart)
echo -n "Restarting udevd: "
killproc ${DAEMON}
${DAEMON} --daemon
rc_status -v
;;
status)
echo -n "Checking for udevd: "
checkproc ${DAEMON}
rc_status -v
;;
reload|force-reload)
echo -n "Reloading udevd: "
killproc -G -HUP ${DAEMON}
rc_status -v
;;
*)
echo "Usage: $0 {start|stop|restart|status|reload|force-reload}"
exit 1
;;
esac
rc_exit