updated on Tue Jan 10 04:01:21 UTC 2012
[aur-mirror.git] / brother-mfc-8870dw / brother-mfc-8870dw.install
blob354765b6075c011c3d0a559b5ea5043d49d0b584
1 post_install() {
2   __port2=`lpinfo -v | grep -i 'usb://Brother/MFC-8870DW' | head -1`
3   if [ "$__port2" = '' ];then
4           __port2=`lpinfo -v | grep 'usb://' | head -1`
5   fi
6   __port=`echo $__port2| sed s/direct//g`
7   if [ "$__port" = '' ];then
8           __port="usb:/dev/usb/lp0"
9   fi
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/"
23 post_upgrade() {
24   /bin/true
27 pre_remove() {
28   lpadmin -x HL2030
32 op=$1
33 shift
35 $op "$@"