p910nd: restart daemon even if no driver file is needed
authorPaul Donald <newtwen@gmail.com>
Tue, 5 Mar 2024 13:59:49 +0000 (14:59 +0100)
committerJosef Schlehofer <pepe.schlehofer@gmail.com>
Thu, 14 Mar 2024 13:28:25 +0000 (14:28 +0100)
Not all USB printers need a blob loading; restart the daemon
independently of driver loading.

Closes openwrt/packages#23588

Signed-off-by: Paul Donald <newtwen@gmail.com>
Tested-by: minicx <minicx@disroot.org>
(cherry picked from commit 685ef7d97b345c09edd428250794dd9fce07a174)

net/p910nd/Makefile
net/p910nd/files/p910nd.hotplug

index a4949b892945e066fa8a9bec4ff2f1938e48e477..062a90bd19fd50c3566c1c9859957483d8c0e19a 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=p910nd
 PKG_VERSION:=0.97
-PKG_RELEASE:=11
+PKG_RELEASE:=12
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=@SF/p910nd
index 1c37a9f4c538bc2d088a2bf3aa38fd3edd9b6175..3440a86ed8f1e551df2c6827d055f94f20158442 100644 (file)
@@ -335,10 +335,9 @@ send_driver() {
                        logger -t "$DAEMON_HOTPLUG" -p "$DAEMON_ERR" "Sending driver to $CHAR_DEV [ $THIS_USB_VIDPID ] failed for some reason."
                else
                        logger -t "$DAEMON_HOTPLUG" -p "$DAEMON_INFO" "Sent $DRIVER_FILE to $CHAR_DEV [ $THIS_USB_VIDPID ]."
-                       daemon_restart
                fi
        else
-               logger -t "$DAEMON_HOTPLUG"  -p "$DAEMON_ERR" "Missing driver file: $DRIVER_FILE for $CHAR_DEV [ $THIS_USB_VIDPID ] (please upload it)."
+               logger -t "$DAEMON_HOTPLUG"  -p "$DAEMON_INFO" "No driver file: $DRIVER_FILE for $CHAR_DEV [ $THIS_USB_VIDPID ] (upload it if your printer needs a driver loading)."
        fi
 }
 
@@ -376,6 +375,8 @@ case "$ACTION" in
                        fi
                fi
 
+               daemon_restart
+
                ;;
        remove)
                # device is gone