Группа :: Система/Ядро и оборудование
Пакет: foo2zjs
Главная Изменения Спек Патчи Загрузить Bugs and FR
Патч: foo2zjs-20060416-alt-hotplug.patch
diff -Naur foo2zjs-orig/hplj1000 foo2zjs/hplj1000
--- foo2zjs-orig/hplj1000 2006-04-02 06:52:14 +0300
+++ foo2zjs/hplj1000 2006-04-18 17:27:12 +0300
@@ -24,6 +24,7 @@
esac
PROGNAME="$0"
+PROGDIR="`dirname "$0"`"
#
# Set $DEV to, e.g. /dev/usb/lp0, to force the device you want
@@ -96,11 +97,13 @@
if [ "$USB2" != "" ]; then
if [ -w /etc/hotplug/usb.usermap ]; then
USERMAP=/etc/hotplug/usb.usermap
- elif [ -d /etc/hotplug/usb/ ]; then
+ elif [ -d /etc/hotplug/usb/ -a -w /etc/hotplug/usb/ ]; then
USERMAP=/etc/hotplug/usb/foo2zjs.usermap
if [ ! -s $USERMAP ]; then
echo > $USERMAP
fi
+ elif [ -d "$PROGDIR" -a -w "$PROGDIR" ]; then
+ USERMAP="$PROGDIR/foo2zjs.usermap"
else
log "No /etc/hotplug usermap!"
exit
@@ -163,7 +166,7 @@
status=`$USBID $dev 2>/dev/null | grep -y "hp LaserJet $MODEL"`
if [ "$status" != "" ]; then
# This is a LaserJet 100x
- chmod 0666 $dev
+ #chmod 0666 $dev
status=`$USBID $dev | grep 'FWVER'`
if [ "$status" = "" ]; then
# Firmware is not yet loaded