SHA256
1
0
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:
Robert Milasan 2013-01-08 13:29:03 +00:00 committed by Git OBS Bridge
parent 01ebcbf43e
commit 0227bf9cb1
5 changed files with 25 additions and 24 deletions

View File

@ -14,19 +14,22 @@
. /etc/rc.status . /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 udev_timeout=180
case "$1" in case "$1" in
start) start)
# create /dev/root symlink with dynamic rule # create /dev/root symlink with dynamic rule
if [ -x /lib/udev/write_dev_root_rule ]; then if [ -x ${WRITERULE} ]; then
/lib/udev/write_dev_root_rule ${WRITERULE} >/dev/null 2>&1 || true
fi fi
# start udevd # start udevd
echo -n "Starting udevd: " echo -n "Starting udevd: "
/sbin/udevd --daemon ${DAEMON} --daemon
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
rc_status -v rc_status -v
rc_exit rc_exit
@ -35,42 +38,32 @@ case "$1" in
# trigger events for all devices # trigger events for all devices
echo -n "Loading drivers, configuring devices: " echo -n "Loading drivers, configuring devices: "
/sbin/udevadm trigger --type=subsystems --action=add ${UDEVADM} trigger --type=subsystems --action=add
/sbin/udevadm trigger --type=devices --action=add ${UDEVADM} trigger --type=devices --action=add
# wait for events to finish # wait for events to finish
/sbin/udevadm settle --timeout=$udev_timeout ${UDEVADM} settle --timeout=$udev_timeout
rc_status -v rc_status -v
;; ;;
stop) stop)
echo -n "Stopping udevd: " echo -n "Stopping udevd: "
killproc /sbin/udevd killproc ${DAEMON}
rc_status -v rc_status -v
;; ;;
restart) restart)
echo -n "Restarting udevd: " echo -n "Restarting udevd: "
killproc /sbin/udevd killproc ${DAEMON}
/sbin/udevd --daemon ${DAEMON} --daemon
rc_status -v rc_status -v
;; ;;
status) status)
echo -n "Checking for udevd: " echo -n "Checking for udevd: "
checkproc /sbin/udevd checkproc ${DAEMON}
rc_status -v rc_status -v
;; ;;
reload) reload|force-reload)
echo -n "Reloading udev rules: " echo -n "Reloading udevd: "
/sbin/udevadm control --reload-rules killproc -G -HUP ${DAEMON}
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
rc_status -v rc_status -v
;; ;;
*) *)

View File

@ -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 add: 1007-udevd-add-missing-to-getopt_long-e.patch
- clean up systemd.spec, make it easy to see which are udev and - clean up systemd.spec, make it easy to see which are udev and
systemd patches. systemd patches.
- make 'reload' and 'force-reload' LSB compliant (bnc#793936).
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Dec 11 00:22:50 UTC 2012 - crrodriguez@opensuse.org Tue Dec 11 00:22:50 UTC 2012 - crrodriguez@opensuse.org

View File

@ -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 install -m755 -D %{S:8} $RPM_BUILD_ROOT/etc/init.d/systemd-journald
%endif %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 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 ln -s systemd-udevd.service $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/udev.service
sed -ie "s|@@PREFIX@@|%{_bindir}|g" %{S:1061} sed -ie "s|@@PREFIX@@|%{_bindir}|g" %{S:1061}

View File

@ -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 add: 1007-udevd-add-missing-to-getopt_long-e.patch
- clean up systemd.spec, make it easy to see which are udev and - clean up systemd.spec, make it easy to see which are udev and
systemd patches. systemd patches.
- make 'reload' and 'force-reload' LSB compliant (bnc#793936).
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Dec 11 00:22:50 UTC 2012 - crrodriguez@opensuse.org Tue Dec 11 00:22:50 UTC 2012 - crrodriguez@opensuse.org

View File

@ -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 install -m755 -D %{S:8} $RPM_BUILD_ROOT/etc/init.d/systemd-journald
%endif %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 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 ln -s systemd-udevd.service $RPM_BUILD_ROOT/%{_prefix}/lib/systemd/system/udev.service
sed -ie "s|@@PREFIX@@|%{_bindir}|g" %{S:1061} sed -ie "s|@@PREFIX@@|%{_bindir}|g" %{S:1061}