Skip to content

Commit

Permalink
Make "update-usbids.sh" work better from cronjobs; update usb.ids
Browse files Browse the repository at this point in the history
  • Loading branch information
David Brownell committed Oct 30, 2007
1 parent b64cfa4 commit 42f77da
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2007-10-29 Robin H. Johnson <robbat2@gentoo.org>
* update-usbids.sh: add "-q" (quiet) option for cron jobs;
skip filesystems that are readonly

2007-10-23 David Brownell <dbrownell@users.sourceforge.net>
* usb.ids: update to current version (with new maintainer)
* lsusb.c: Stop hiding unrecognized/misplaced class specific
Expand Down
16 changes: 13 additions & 3 deletions update-usbids.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,23 @@

# see also update-pciids.sh (fancier)

[ "$1" = "-q" ] && quiet="true" || quiet="false"

set -e
SRC="http://www.linux-usb.org/usb.ids"
DEST=usb.ids

if which wget >/dev/null ; then
# if usb.ids is read-only (because the filesystem is read-only),
# then just skip this whole process.
if ! touch ${DEST} >&2 >/dev/null ; then
${quiet} || echo "${DEST} is read-only, exiting."
exit 0
fi

if which wget >/dev/null 2>&1 ; then
DL="wget -O $DEST.new $SRC"
elif which lynx >/dev/null ; then
${quiet} && DL="$DL -q"
elif which lynx >/dev/null 2>&1 ; then
DL="eval lynx -source $SRC >$DEST.new"
else
echo >&2 "update-usbids: cannot find wget nor lynx"
Expand All @@ -33,4 +43,4 @@ if [ -f $DEST ] ; then
fi
mv $DEST.new $DEST

echo "Done."
${quiet} || echo "Done."
9 changes: 7 additions & 2 deletions usb.ids
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# The latest version can be obtained from
# http://www.linux-usb.org/usb.ids
#
# $Id: usb.ids,v 1.22 2007/10/23 21:43:08 dbrownell Exp $
# $Id: usb.ids,v 1.23 2007/10/30 02:43:59 dbrownell Exp $
#

# Vendors, devices and interfaces. Please keep sorted.
Expand Down Expand Up @@ -763,6 +763,8 @@
c517 LX710 Cordless Desktop Laser
c518 MX610 Laser Cordless Mouse
c521 MX620 Laser Cordless Mouse
c626 3DConnexion Space Navigator 3D Mouse
c627 3DConnexion Space Explorer 3D Mouse
c703 Elite Keyboard Y-RP20 + Mouse MX900 (Bluetooth)
c709 BT Mini-Receiver (HCI mode)
c70b BT Mini-Receiver (HID proxy mode)
Expand Down Expand Up @@ -822,6 +824,7 @@
1005 TurboBall
1009 Orbit TrackBall for Mac
101f PocketMouse Pro
1020 Expert Mouse Trackball
2010 Wireless Presentation Remote
4005 Gravis Eliminator GamePad Pro
4006 Gravis Eliminator AfterShock
Expand Down Expand Up @@ -3292,6 +3295,8 @@
0a22 Century Semiconductor USA, Inc.
0a2c AK-Modul-Bus Computer GmbH
0008 GPIO Ports
0a34 TG3 Electronics, Inc.
0110 Deck 82-key backlit keyboard
0a39 Gilat Satellite Networks, Ltd
0a3a PentaMedia Co., Ltd
0a3c NTT DoCoMo, Inc.
Expand Down Expand Up @@ -4532,7 +4537,7 @@
13fe Kingston Technology Company Inc.
1a00 512MB/1GB Flash Drive
1a23 512MB Flash Drive
1d00 DataTraveler 2.0 1GB Flash Drive
1d00 DataTraveler 2.0 1GB/4GB Flash Drive
1453 Radio Shack
4026 26-183 Serial Cable
1462 Micro Star International
Expand Down

0 comments on commit 42f77da

Please sign in to comment.