[Bug 498302] New: (Tiny) Feature Request - Include an "update"-Script for USB-IDs in "usbutils"
http://bugzilla.novell.com/show_bug.cgi?id=498302 Summary: (Tiny) Feature Request - Include an "update"-Script for USB-IDs in "usbutils" Classification: openSUSE Product: openSUSE 11.2 Version: Milestone 1 Platform: All OS/Version: SuSE Other Status: NEW Severity: Enhancement Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: AxelKoellhofer@web.de QAContact: qa@suse.de Found By: --- User-Agent: Opera/9.64 (X11; Linux x86_64; U; de) Presto/2.1.1 The package "pciutils" contains a convenient, little script called "update-pciids" which downloads and installs the latest PCI-ID database from http://pciids.sourceforge.net/. There is also a similar script "update-usbids" present in some other linux distributions but not in openSUSE. Actually, I "stole" this script "ruthlessly" from Archlinux and adapted it for openSUSE (added curl as "first option" and changed path where the usb.ids file will be stored). #!/bin/sh # see also update-pciids.sh (fancier) set -e SRC="http://www.linux-usb.org/usb.ids" DEST=/usr/share/usb.ids if which curl >/dev/null 2>&1 ; then DL="curl -o $DEST.new $SRC" elif which wget >/dev/null ; then DL="wget -O $DEST.new $SRC" elif which lynx >/dev/null ; then DL="eval lynx -source $SRC >$DEST.new" else echo >&2 "update-usbids: cannot find curl nor wget nor lynx" exit 1 fi if ! $DL ; then echo >&2 "update-usbids: download failed" rm -f $DEST.new exit 1 fi if ! grep >/dev/null "^C " $DEST.new ; then echo >&2 "update-usbids: missing class info, probably truncated file" exit 1 fi if [ -f $DEST ] ; then mv $DEST $DEST.old # --reference is supported only by chmod from GNU file, so let's ignore any errors chmod -f --reference=$DEST.old $DEST.new 2>/dev/null || true fi mv $DEST.new $DEST echo "Done." I think it would be a good idea to add this script to the usbutils package for the next openSUSE-release. Reproducible: Always Steps to Reproduce: 1. 2. 3. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=498302
Zheng Chen
http://bugzilla.novell.com/show_bug.cgi?id=498302
User AxelKoellhofer@web.de added comment
http://bugzilla.novell.com/show_bug.cgi?id=498302#c1
--- Comment #1 from Axel Köllhofer
http://bugzilla.novell.com/show_bug.cgi?id=498302
User AxelKoellhofer@web.de added comment
http://bugzilla.novell.com/show_bug.cgi?id=498302#c2
Axel Köllhofer
participants (1)
-
bugzilla_noreply@novell.com