1 --- cupswrapperHL5040-1.0.2 2005-06-13 01:38:23.000000000 +0200
2 +++ cupswrapper_NEW 2011-01-26 11:31:53.000000000 +0100
4 < if [ "$1" = '-e' ]; then
6 < rm -f /usr/share/cups/model/brhl5040_cups.ppd
7 < rm -f /usr/lib/cups/filter/brlpdwrapperHL5040
8 < rm -f /usr/lib64/cups/filter/brlpdwrapperHL5040
9 < rm -f /usr/local/Brother/cupswrapper/brcupsconfig
10 < if [ -e /etc/init.d/cups ]; then
11 < /etc/init.d/cups restart
13 < if [ -e /etc/init.d/cupsys ]; then
14 < /etc/init.d/cupsys restart
18 < if [ "$1" = "-r" ]; then
20 < if [ -e /etc/init.d/cups ]; then
21 < /etc/init.d/cups restart
23 < if [ -e /etc/init.d/cupsys ]; then
24 < /etc/init.d/cupsys restart
28 < if [ "$1" = "help" ] || [ "$1" = "-h" ]; then
29 < echo 'option -h : help'
30 < echo ' -i : install'
31 < echo ' -e : uninstall'
32 < echo ' -r : remove printer'
35 < mkdir -p /usr/local/Brother/filter
36 < mkdir -p /usr/lib/cups/filter
38 > #if [ "$1" = '-e' ]; then
40 > # rm -f /usr/share/cups/model/brhl5040_cups.ppd
41 > # rm -f /usr/lib/cups/filter/brlpdwrapperHL5040
42 > # rm -f /usr/lib64/cups/filter/brlpdwrapperHL5040
43 > # rm -f /usr/local/Brother/cupswrapper/brcupsconfig
44 > # if [ -e /etc/init.d/cups ]; then
45 > # /etc/init.d/cups restart
47 > # if [ -e /etc/init.d/cupsys ]; then
48 > # /etc/init.d/cupsys restart
52 > #if [ "$1" = "-r" ]; then
54 > # if [ -e /etc/init.d/cups ]; then
55 > # /etc/init.d/cups restart
57 > # if [ -e /etc/init.d/cupsys ]; then
58 > # /etc/init.d/cupsys restart
62 > #if [ "$1" = "help" ] || [ "$1" = "-h" ]; then
63 > # echo 'option -h : help'
64 > # echo ' -i : install'
65 > # echo ' -e : uninstall'
66 > # echo ' -r : remove printer'
69 > #mkdir -p /usr/local/Brother/filter
70 > #mkdir -p /usr/lib/cups/filter
72 > #if [ -e "/usr/local/Brother/lpd/filterHL5040" ]; then
75 > # echo "ERROR : Brother LPD filter is not installed."
77 > #rm -f /usr/share/cups/model/brhl5040_cups.ppd
78 > #ppd_file_name=/usr/share/cups/model/brhl5040_cups.ppd
80 < if [ -e "/usr/local/Brother/lpd/filterHL5040" ]; then
83 < echo "ERROR : Brother LPD filter is not installed."
85 < rm -f /usr/share/cups/model/brhl5040_cups.ppd
86 < ppd_file_name=/usr/share/cups/model/brhl5040_cups.ppd
88 > # Write PPD file into CWD
89 > ppd_file_name=HL5040.ppd
91 < brotherlpdwrapper=/usr/lib/cups/filter/brlpdwrapperHL5040
92 < brotherlpdwrapper64=/usr/lib64/cups/filter/brlpdwrapperHL5040
93 < rm -f $brotherlpdwrapper
94 < echo 'rm -f /usr/lib/cups/filter/brlpdwrapperHL5040'
96 > #brotherlpdwrapper=/usr/lib/cups/filter/brlpdwrapperHL5040
97 > #brotherlpdwrapper64=/usr/lib64/cups/filter/brlpdwrapperHL5040
98 > #rm -f $brotherlpdwrapper
99 > #echo 'rm -f /usr/lib/cups/filter/brlpdwrapperHL5040'
101 > # Write brlpdwrapper into CWD
102 > brotherlpdwrapper=brlpdwrapperHL5040
104 < chmod a+x $brotherlpdwrapper
105 < if [ -e /usr/lib64/cups/filter ]; then
106 < cp $brotherlpdwrapper $brotherlpdwrapper64
109 < chmod a+w /usr/local/Brother/inf/brHL5040rc
110 < chmod a+w /usr/local/Brother/inf
111 < if [ -e /etc/init.d/lpd ]; then
112 < /etc/init.d/lpd stop
114 < if [ -e /etc/init.d/lprng ]; then
115 < /etc/init.d/lprng stop
117 < if [ -e /etc/init.d/cups ]; then
118 < /etc/init.d/cups restart
120 < if [ -e /etc/init.d/cupsys ]; then
121 < /etc/init.d/cupsys restart
124 < lpadmin -p HL5040 -E -v usb:/dev/usb/lp0 -m brhl5040_cups.ppd
127 > #chmod a+x $brotherlpdwrapper
128 > #if [ -e /usr/lib64/cups/filter ]; then
129 > # cp $brotherlpdwrapper $brotherlpdwrapper64
132 > #chmod a+w /usr/local/Brother/inf/brHL5040rc
133 > #chmod a+w /usr/local/Brother/inf
134 > #if [ -e /etc/init.d/lpd ]; then
135 > # /etc/init.d/lpd stop
137 > #if [ -e /etc/init.d/lprng ]; then
138 > # /etc/init.d/lprng stop
140 > # if [ -e /etc/init.d/cups ]; then
141 > # /etc/init.d/cups restart
143 > # if [ -e /etc/init.d/cupsys ]; then
144 > # /etc/init.d/cupsys restart
147 > #lpadmin -p HL5040 -E -v usb:/dev/usb/lp0 -m brhl5040_cups.ppd