forked from pool/systemd
- make 'reload' and 'force-reload' LSB compliant (bnc#793936).
- make 'reload' and 'force-reload' LSB compliant (bnc#793936). OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=325
This commit is contained in:
parent
01ebcbf43e
commit
0227bf9cb1
41
boot.udev
41
boot.udev
@ -14,19 +14,22 @@
|
||||
|
||||
. /etc/rc.status
|
||||
|
||||
PATH="/sbin:/bin"
|
||||
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 /lib/udev/write_dev_root_rule ]; then
|
||||
/lib/udev/write_dev_root_rule
|
||||
if [ -x ${WRITERULE} ]; then
|
||||
${WRITERULE} >/dev/null 2>&1 || true
|
||||
fi
|
||||
|
||||
# start udevd
|
||||
echo -n "Starting udevd: "
|
||||
/sbin/udevd --daemon
|
||||
${DAEMON} --daemon
|
||||
if [ $? -ne 0 ]; then
|
||||
rc_status -v
|
||||
rc_exit
|
||||
@ -35,42 +38,32 @@ case "$1" in
|
||||
|
||||
# trigger events for all devices
|
||||
echo -n "Loading drivers, configuring devices: "
|
||||
/sbin/udevadm trigger --type=subsystems --action=add
|
||||
/sbin/udevadm trigger --type=devices --action=add
|
||||
${UDEVADM} trigger --type=subsystems --action=add
|
||||
${UDEVADM} trigger --type=devices --action=add
|
||||
|
||||
# wait for events to finish
|
||||
/sbin/udevadm settle --timeout=$udev_timeout
|
||||
${UDEVADM} settle --timeout=$udev_timeout
|
||||
rc_status -v
|
||||
;;
|
||||
stop)
|
||||
echo -n "Stopping udevd: "
|
||||
killproc /sbin/udevd
|
||||
killproc ${DAEMON}
|
||||
rc_status -v
|
||||
;;
|
||||
restart)
|
||||
echo -n "Restarting udevd: "
|
||||
killproc /sbin/udevd
|
||||
/sbin/udevd --daemon
|
||||
killproc ${DAEMON}
|
||||
${DAEMON} --daemon
|
||||
rc_status -v
|
||||
;;
|
||||
status)
|
||||
echo -n "Checking for udevd: "
|
||||
checkproc /sbin/udevd
|
||||
checkproc ${DAEMON}
|
||||
rc_status -v
|
||||
;;
|
||||
reload)
|
||||
echo -n "Reloading udev rules: "
|
||||
/sbin/udevadm control --reload-rules
|
||||
rc_status -v
|
||||
;;
|
||||
force-reload)
|
||||
echo -n "Restarting udev and reconfiguring all devices: "
|
||||
killproc /sbin/udevd
|
||||
rm -rf /dev/.udev /dev/disk
|
||||
root_symlink_rule
|
||||
/sbin/udevd --daemon
|
||||
/sbin/udevadm trigger --action=add
|
||||
/sbin/udevadm settle --timeout=$udev_timeout
|
||||
reload|force-reload)
|
||||
echo -n "Reloading udevd: "
|
||||
killproc -G -HUP ${DAEMON}
|
||||
rc_status -v
|
||||
;;
|
||||
*)
|
||||
|
@ -5,6 +5,7 @@ Tue Jan 8 12:47:43 UTC 2013 - rmilasan@suse.com
|
||||
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).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 11 00:22:50 UTC 2012 - crrodriguez@opensuse.org
|
||||
|
@ -424,6 +424,9 @@ ln -sf /lib/firmware $RPM_BUILD_ROOT/usr/lib/firmware
|
||||
install -m755 -D %{S:8} $RPM_BUILD_ROOT/etc/init.d/systemd-journald
|
||||
%endif
|
||||
|
||||
sed -ie "s|@@PREFIX@@|%{_prefix}/lib/udev|g" %{S:1060}
|
||||
sed -ie "s|@@SYSTEMD@@|%{_prefix}/lib/systemd|g" %{S:1060}
|
||||
sed -ie "s|@@BINDIR@@|%{_bindir}|g" %{S:1060}
|
||||
install -m755 -D %{S:1060} $RPM_BUILD_ROOT/etc/init.d/boot.udev
|
||||
ln -s systemd-udevd.service $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/udev.service
|
||||
sed -ie "s|@@PREFIX@@|%{_bindir}|g" %{S:1061}
|
||||
|
@ -5,6 +5,7 @@ Tue Jan 8 12:47:43 UTC 2013 - rmilasan@suse.com
|
||||
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).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 11 00:22:50 UTC 2012 - crrodriguez@opensuse.org
|
||||
|
@ -419,6 +419,9 @@ ln -sf /lib/firmware $RPM_BUILD_ROOT/usr/lib/firmware
|
||||
install -m755 -D %{S:8} $RPM_BUILD_ROOT/etc/init.d/systemd-journald
|
||||
%endif
|
||||
|
||||
sed -ie "s|@@PREFIX@@|%{_prefix}/lib/udev|g" %{S:1060}
|
||||
sed -ie "s|@@SYSTEMD@@|%{_prefix}/lib/systemd|g" %{S:1060}
|
||||
sed -ie "s|@@BINDIR@@|%{_bindir}|g" %{S:1060}
|
||||
install -m755 -D %{S:1060} $RPM_BUILD_ROOT/etc/init.d/boot.udev
|
||||
ln -s systemd-udevd.service $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/udev.service
|
||||
sed -ie "s|@@PREFIX@@|%{_bindir}|g" %{S:1061}
|
||||
|
Loading…
Reference in New Issue
Block a user