p910nd: set bidi only if not already set
authorPaul Donald <newtwen+github@gmail.com>
Sun, 31 Mar 2024 18:25:17 +0000 (20:25 +0200)
committerRosen Penev <rosenp@gmail.com>
Tue, 23 Jul 2024 01:51:10 +0000 (18:51 -0700)
Closes #23774

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
(cherry picked from commit 4628b6bd43ac1c212363535fe4d32739c5f7e622)

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

index c8934779a05f95e88489214221b24f6d2a851afc..3e866590cee71e7b9c1a7b5f39b07c10dab68564 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=p910nd
 PKG_VERSION:=0.97
-PKG_RELEASE:=13
+PKG_RELEASE:=14
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=@SF/p910nd
index 3440a86ed8f1e551df2c6827d055f94f20158442..2bebaee8450e18c706495dcb044a12070e1a35d5 100644 (file)
@@ -281,8 +281,7 @@ get_and_store_printer_info() {
                [ "$DEBUG" ] && echo ${MFG:+MFG=$MFG} ${MDL:+MDL=$MDL} ${CMD:+CMD=$CMD} ${CLS:+CLS=$CLS} ${DES:+DES=$DES} ${SN:+SN=$SN}
 
                [ "$DEBUG" ] && echo 'uci set' for UCI_DEV_CFG_NUMBER: $UCI_DEV_CFG_NUMBER
-               # Take the USB info as fact: set bidir regardless. It seems to be a source of confusion.
-               eval "$uqsddu_cmd.bidirectional='$BIDIR'"
+               [ -z "$(eval "$uqgddu_cmd".bidirectional)" ] && eval "$uqsddu_cmd.bidirectional='$BIDIR'"
                [ -z "$(eval "$uqgddu_cmd".port)" ] && eval "$uqsddu_cmd.port='0'"
                [ -z "$(eval "$uqgddu_cmd".enabled)" ] && eval "$uqsddu_cmd.enabled='1'"
                [ -z "$(eval "$uqgddu_cmd".usbvidpid)" ] && [ -n "$THIS_USB_VIDPID" ] && eval "$uqsddu_cmd.usbvidpid='$THIS_USB_VIDPID'"