Sophie

Sophie

distrib > Mageia > 5 > x86_64 > by-pkgid > 89999ba36aa42380f4000a150ed9ea67 > files > 3

lxcontrol-1.3-20.mga5.src.rpm

#!/bin/bash
#
# Sends escapes to Lexmark 5xxx, 7xxx to change cartridges
# (C) 1999 Henryk Paluch, paluch@bimbo.fjfi.cvut.cz
# $Id:$
#
PORT=/dev/lp0

echo "Lexmark(R) JetPrinter(TM) 5xxx,7xxx cartridge changer"
echo "Assuming printer on port $PORT"
echo

if [ ! -w $PORT ];then
 echo "Missing write permissions to printer port $PORT"
 exit 1
fi

echo "Press enter to load cartridge..."
read tmp
echo -ne '\245\000\005\100\340\012\035\160' > $PORT
echo "Insert cartridge and press enter..."
read tmp
echo -ne '\245\000\005\100\340\012\001\000' > $PORT
exit 0