Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > c1a74c753a97baacf14d2d0b996b2a1d > files > 3

lxcontrol-1.3-13.mga3.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