Репозитории ALT
S: | 20200207-alt1 |
D: | 20080605-alt2 |
5.1: | 20100624-alt0.M50P.1 |
4.1: | 20080923-alt1 |
4.0: | 20080806-alt1.M40.1 |
+backports: | 20060523-alt0.9 |
3.0: | 1.59-alt1 |
+backports: | 20060523-alt0.1.M30.1 |
Группа :: Система/Настройка/Оборудование
Пакет: foo2zjs
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: foo2zjs.hplj1000_20091102.patch
Скачать
Скачать
--- foo2zjs.orig/hplj1000 2009-10-27 08:58:06 +0300
+++ foo2zjs/hplj1000 2009-11-02 09:44:32 +0300
@@ -18,13 +18,16 @@
# Mike Morgan (2004)
#
+# load usblp module
+/sbin/modprobe usblp
+
# udev calls us twice on FC4! Just want /dev/usb/lp<N>
case "$DEVNAME" in
/dev/usb/usb*) exit;;
esac
PROGNAME="$0"
-
+PROGDIR="`dirname "$0"`"
#
# Set $DEV to, e.g. /dev/usb/lp0, to force the device you want
# Else, leave it null to automatically detect the device
@@ -35,7 +38,7 @@
#
# Directory to find downloadable HP firmware files sihpMMMM.dl
#
-FWDIR=/usr/share/foo2zjs/firmware
+FWDIR=/var/lib/foo2zjs/firmware
#
# Program used to determine USB printer id information
@@ -77,37 +80,37 @@
MODEL=P1005; FWMODEL=$MODEL
USB1=0x03f0 #Vendor
USB2=0x3d17 #Model
- FWDIR=/usr/share/foo2xqx/firmware
+ FWDIR=/var/lib/foo2xqx/firmware
;;
*P1006)
MODEL=P1006; FWMODEL=$MODEL
USB1=0x03f0 #Vendor
USB2=0x3e17 #Model
- FWDIR=/usr/share/foo2xqx/firmware
+ FWDIR=/var/lib/foo2xqx/firmware
;;
*P1007)
MODEL=P1007; FWMODEL=P1005 # Alias
USB1=0x03f0 #Vendor
USB2=0x4817 #Model
- FWDIR=/usr/share/foo2xqx/firmware
+ FWDIR=/var/lib/foo2xqx/firmware
;;
*P1008)
MODEL=P1008; FWMODEL=P1006 # Alias
USB1=0x03f0 #Vendor
USB2=0x4917 #Model
- FWDIR=/usr/share/foo2xqx/firmware
+ FWDIR=/var/lib/foo2xqx/firmware
;;
*P1505)
MODEL=P1505; FWMODEL=$MODEL
USB1=0x03f0 #Vendor
USB2=0x3f17 #Model
- FWDIR=/usr/share/foo2xqx/firmware
+ FWDIR=/var/lib/foo2xqx/firmware
;;
*P1505n)
MODEL=P1505n; FWMODEL=$MODEL
USB1=0x03f0 #Vendor
USB2=0x4017 #Model
- FWDIR=/usr/share/foo2xqx/firmware
+ FWDIR=/var/lib/foo2xqx/firmware
;;
*1000)
MODEL=1000; FWMODEL=$MODEL
@@ -144,16 +147,18 @@
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
fi
- chmod 664 $USERMAP
+ #chmod 664 $USERMAP
ex - $USERMAP <<-EOF
g/^hplj$MODEL/d
\$a
@@ -193,8 +198,20 @@
fw="$FWDIR/sihp$FWMODEL.dl"
if [ ! -f "$fw" ]; then
log "Missing HP LaserJet $MODEL firmware file $fw"
- log "...read foo2zjs installation instructions and run ./getweb $MODEL"
- return 1
+# п│п╩я▀. п²п╣я┌ п©я─п╬я┬п╦п╡п╨п╦. п║п╪п╬я┌я─п╦п╪, я┐я│я┌п╟п╫п╬п╡п╩п╣п╫ п╩п╦ foo2zjs_download_fw. п∙я│п╩п╦ п╢п╟, я┌п╬ п©я─п╬п╠я┐п╣п╪ я│п╨п╟я┤п╟я┌я▄ п©я─п╬я┬п╦п╡п╨я┐.
+ app_fwd="/usr/sbin/foo2zjs_download_fw"
+ if [ ! -f "$app_fwd" ]; then
+ log "Firmware not installing. Read foo2zjs installation instructions (/usr/share/doc/foo2zjs-XXXXXXXX/README-UTF8.ALT)"
+ return 1
+ else
+ log "Yes! foo2zjs_download_fw installed. Try download firmware $MODEL ...."
+ if $app_fwd $FWMODEL $FWDIR; then
+ log "Can't download firmware. Read foo2zjs installation instructions (/usr/share/doc/foo2zjs-XXXXXXXX/README-UTF8.ALT)"
+ return 1
+ else
+ log "Firmware downloding, unpacking and installed"
+ fi
+ fi
fi
log "loading HP LaserJet $MODEL firmware $fw to $_dev ..."
@@ -205,6 +222,8 @@
else
log "... download failed."
fi
+ log ".... remove usblp module"
+ /sbin/rmmod usblp
) &
return 0
}
@@ -226,7 +245,7 @@
status=`$PRINTERID $dev 2>/dev/null | grep -y "hp LaserJet $MODEL"`
if [ "$status" != "" ]; then
# This is a LaserJet 100x
- chmod 0666 $dev
+ #chmod 0666 $dev
status=`$PRINTERID $dev | grep 'FWVER'`
if [ "$status" = "" ]; then
# Firmware is not yet loaded