Hi Martin, hi systemd maintainers, Le mercredi, 6 janvier 2016, 15.54:52 Jakub Wilk a écrit : > Package: usb-modeswitch > Version: 2.2.6+repack0-1 > Severity: grave > > /lib/udev/usb_modeswitch uses /lib/udev/hotplug.functions, but this > file > has been removed: > | systemd (228-3) unstable; urgency=medium > | > | [ Martin Pitt ] > | * Eliminate "hotplug.functions" udev helper and put the logging > | functions directly into net.agent. This simplifies the migration > | of the latter to ifupdown.
usb-modeswitch was using the wait_for_file function from hotplug.functions to avoid code duplication (with the patch attached). This function was useful when /usr was mounted "late", could it be reintroduced, or should I just remove the patch? Cheers, OdyX
Description: Use udev-in-Debian specific tools for the waiting script This is inspired from alsa-utils' Author: Didier Raboud <o...@debian.org> Origin: vendor Last-Update: 2013-09-17 --- a/usb_modeswitch.sh +++ b/usb_modeswitch.sh @@ -66,9 +66,9 @@ --symlink-name) device_in "link_list" $v_id $p_id if [ "$?" = "1" ]; then - if [ -e "/usr/sbin/usb_modeswitch_dispatcher" ]; then - exec usb_modeswitch_dispatcher $1 $2 2>>/dev/null - fi + . /lib/udev/hotplug.functions + wait_for_file /usr/sbin/usb_modeswitch_dispatcher + exec usb_modeswitch_dispatcher $1 $2 2>>/dev/null fi exit 0 ;; @@ -78,12 +78,8 @@ $1 EOF PATH=/bin:/sbin:/usr/bin:/usr/sbin -count=20 -while [ $count != 0 ]; do - if [ ! -e "/usr/sbin/usb_modeswitch_dispatcher" ]; then - sleep 1 - count=$(($count - 1)) - else + . /lib/udev/hotplug.functions + wait_for_file /usr/sbin/usb_modeswitch_dispatcher if [ -e "/etc/systemd/system/usb_modeswitch@.service" ]; then exec systemctl --no-block start usb_modeswitch@$p1'_'$p2.service elif [ -e "/etc/init/usb-modeswitch-upstart.conf" ]; then @@ -92,7 +88,5 @@ exec usb_modeswitch_dispatcher --switch-mode $1 & fi exit 0 - fi -done ) & exit 0