summarylogtreecommitdiffstats
path: root/brother-hl2030.install
diff options
context:
space:
mode:
Diffstat (limited to 'brother-hl2030.install')
-rw-r--r--brother-hl2030.install34
1 files changed, 34 insertions, 0 deletions
diff --git a/brother-hl2030.install b/brother-hl2030.install
new file mode 100644
index 000000000000..7888a1928fb3
--- /dev/null
+++ b/brother-hl2030.install
@@ -0,0 +1,34 @@
+post_install() {
+ __port2=`lpinfo -v | grep -i 'usb://Brother/HL-2030' | head -1`
+ if [ "$__port2" = '' ];then
+ __port2=`lpinfo -v | grep 'usb://' | head -1`
+ fi
+ __port=`echo $__port2| sed s/direct//g`
+ if [ "$__port" = '' ];then
+ __port="usb:/dev/usb/lp0"
+ fi
+
+ lpadmin -p HL2030 -E -v $__port -P /usr/share/cups/model/HL2030.ppd
+ echo "If CUPS is not running now, start it after installation"
+ echo "and type command:"
+ echo " lpadmin -p HL2030 -E -v URL -P /usr/share/cups/model/HL2030.ppd"
+ echo "where URL can be found using command:"
+ echo " lpinfo -v | grep -i 'Brother'"
+ echo "You can also register new printer using web interface at:"
+ echo " http://localhost:631/"
+}
+
+post_upgrade() {
+ /bin/true
+}
+
+pre_remove() {
+ lpadmin -x HL2030
+}
+
+
+op=$1
+shift
+
+$op "$@"
+