network-wizard fails: illegal string in gtkdialog3 script
Posted: Fri 14 Oct 2011, 12:54
Platform:
Dell Inspiron mini 1012
Puppy version: 511
/usr/sbin/net-setup.sh version: 25feb10
Symptom:
network-wizard fails silently!!!
Problem:
For some strange reason the kernel prepends "<A" to USB device''s smanufacturer string on this netbook
$ cat /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-5/manufacturer
<ADell Wireless 5540
$ cat /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-5/product
Dell Wireless 5540
(the "A<" prefix isn't a typo)
The function findInterfaceInfo() in net-setup.sh picks up the string, fails to sanitize it and blindly sets the MANU variable accordingly.
The (dynamic) gtkdialog3 script fails miserably (as '<' is used as its tag deliniter) and network-wizard exits, unable to tell the user what happened.
Solution:
The function findInterfaceInfo() in net-setup.sh should filter out '<', '>' and other gtkdialog3's special characters for the PROC/MANU/INFO strings.
Suggested fix:
Add the following before findInterfaceInfo() returns:
Thanks to all who contribute to puppy linux.
Dell Inspiron mini 1012
Puppy version: 511
/usr/sbin/net-setup.sh version: 25feb10
Symptom:
network-wizard fails silently!!!
Problem:
For some strange reason the kernel prepends "<A" to USB device''s smanufacturer string on this netbook
$ cat /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-5/manufacturer
<ADell Wireless 5540
$ cat /sys/devices/pci0000:00/0000:00:1d.7/usb1/1-5/product
Dell Wireless 5540
(the "A<" prefix isn't a typo)
The function findInterfaceInfo() in net-setup.sh picks up the string, fails to sanitize it and blindly sets the MANU variable accordingly.
The (dynamic) gtkdialog3 script fails miserably (as '<' is used as its tag deliniter) and network-wizard exits, unable to tell the user what happened.
Solution:
The function findInterfaceInfo() in net-setup.sh should filter out '<', '>' and other gtkdialog3's special characters for the PROC/MANU/INFO strings.
Suggested fix:
Add the following before findInterfaceInfo() returns:
Code: Select all
# if PROD / MANU / INFO contain the < or > characters, the produced gtkdialog3
# script will fail; so remove these dangerous characters
PROD=$(echo "$PROD"|tr -d '<>')
MANU=$(echo "$MANU"|tr -d '<>')
INFO=$(echo "$INFO"|tr -d '<>')
Thanks to all who contribute to puppy linux.