updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / brother-hl2030 / brother-hl2030.install
blob7888a1928fb331303f14891cef530bef2c949c0f
1 post_install() {
2   __port2=`lpinfo -v | grep -i 'usb://Brother/HL-2030' | 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 HL2030 -E -v $__port -P /usr/share/cups/model/HL2030.ppd
12   echo "If CUPS is not running now, start it after installation"
13   echo "and type command:" 
14   echo "  lpadmin -p HL2030 -E -v URL -P /usr/share/cups/model/HL2030.ppd"
15   echo "where URL can be found using command:"
16   echo "  lpinfo -v | grep -i 'Brother'"
17   echo "You can also register new printer using web interface at:"
18   echo "  http://localhost:631/"
21 post_upgrade() {
22   /bin/true
25 pre_remove() {
26   lpadmin -x HL2030
30 op=$1
31 shift
33 $op "$@"