2 __port2=`lpinfo -v | grep -i 'usb://Brother/MFC-8870DW' | head -1`
3 if [ "$__port2" = '' ];then
4 __port2=`lpinfo -v | grep 'usb://' | head -1`
6 __port=`echo $__port2| sed s/direct//g`
7 if [ "$__port" = '' ];then
8 __port="usb:/dev/usb/lp0"
11 lpadmin -p MFC8870DW -E -v $__port -P /usr/share/cups/model/MFC8870DW.ppd
12 echo "If CUPS is not running now, start it after installation"
13 echo "and type command:"
14 echo " lpadmin -p MC8870DW -E -v URL -P /usr/share/cups/model/MFC8870DW.ppd"
15 echo "where URL can be found using command:"
16 echo " lpinfo -v | grep -i 'Brother'"
17 echo "in case of a network printer, take URL:"
18 echo " lpd://ipaddress/binary_p1"
19 echo "You can also register the new printer using web interface at:"
20 echo " http://localhost:631/"