Siduction Forum

Siduction Forum => Scripting & Kernelhacking => Topic started by: postkutscher on 2013/04/02, 17:07:18

Title: Skript für Treiberinstallation Brother DCP-9010CN
Post by: postkutscher on 2013/04/02, 17:07:18
Hallo,

ich habe mir mal ein script zusammen gebastelt.
Es funktioniert, aber vielleicht kann man ja eleganter bzw. einfacher schreiben.

Code: [Select]

#! bin/bash
# DCP-9010CN_Treiberinstall.sh
if test $(id -u) != 0; then
 echo "\033[1;31mFehler: werde zu su oder sux und starte das script neu! \033[0m"
 exit 1
fi
mkdir -p $HOME/DCP-9010CN && cd $HOME/DCP-9010CN && echo "Verzeichnis erstellt"
mkdir /var/spool/lpd && echo "Verzeichnis erstellt"
wget www.brother.com/pub/bsc/linux/dlf/dcp9010cncupswrapper-1.1.2-1.i386.deb && echo "\033[500C\033[4D\033[1;32mOK\033[0m"
wget www.brother.com/pub/bsc/linux/dlf/dcp9010cnlpr-1.1.2-1.i386.deb && echo "\033[500C\033[4D\033[1;32mOK\033[0m"
apt-get update && apt-get install --assume-yes sane-utils && echo "\033[500C\033[4D\033[1;32mOK\033[0m"
if [ "$(uname -m)" = "x86_64" ]; then
   wget www.brother.com/pub/bsc/linux/dlf/brscan3-0.2.11-5.amd64.deb && echo "\033[500C\033[4D\033[1;32mOK\033[0m"
   wget www.brother.com/pub/bsc/linux/dlf/brscan-skey-0.2.4-0.amd64.deb && echo "\033[500C\033[4D\033[1;32mOK\033[0m"
   apt-get install --assume-yes cups csh lib32stdc++6 && echo "\033[500C\033[4D\033[1;32mOK\033[0m"
   dpkg -i --force-all --force-architecture dcp9010cnlpr-1.1.2-1.i386.deb && echo "\033[500C\033[4D\033[1;32mOK\033[0m"
   dpkg -i --force-all --force-architecture dcp9010cncupswrapper-1.1.2-1.i386.deb && echo "\033[500C\033[4D\033[1;32mOK\033[0m"
   dpkg -i --force-all brscan3-0.2.11-5.amd64.deb && echo "\033[500C\033[4D\033[1;32mOK\033[0m"
   dpkg -i --force-all brscan-skey-0.2.4-0.amd64.deb && echo "\033[500C\033[4D\033[1;32mOK\033[0m"
   brsaneconfig3 -a name=SCANNER model=DCP-9010CN ip=192.168.178.21 echo "\033[500C\033[4D\033[1;32mOK\033[0m"
   ln -s /usr/lib64/sane /usr/lib/sane && echo "\033[500C\033[4D\033[1;32mOK\033[0m"
   ln -s /usr/lib64/libbrscandec3.so /usr/lib/libbrscandec3.so && echo "\033[500C\033[4D\033[1;32mOK\033[0m"
   dpkg -l | grep Brother
   brsaneconfig3 -q | grep SCANNER
   rm -rf $HOME/DCP-9010CN && echo "\033[1;32mTreiber wurden erfolgreich installiert \033[0m"
   exit 1
elif [ $(uname -m) = "i386" -o $(uname -m) = "i686" ]; then
   wget www.brother.com/pub/bsc/linux/dlf/brscan3-0.2.11-4.i386.deb && echo "\033[500C\033[4D\033[1;32mOK\033[0m"
   wget www.brother.com/pub/bsc/linux/dlf/brscan-skey-0.2.4-0.i386.deb && echo "\033[500C\033[4D\033[1;32mOK\033[0m"
   dpkg -i --force-all dcp9010cnlpr-1.1.2-1.i386.deb && echo "\033[500C\033[4D\033[1;32mOK\033[0m"
   dpkg -i --force-all dcp9010cncupswrapper-1.1.2-1.i386.deb && echo "\033[500C\033[4D\033[1;32mOK\033[0m"
   dpkg -i --force-all brscan3-0.2.11-4.i386.deb && echo "\033[500C\033[4D\033[1;32mOK\033[0m"
   dpkg -i --force-all brscan-skey-0.2.4-0.i386.deb && echo "\033[500C\033[4D\033[1;32mOK\033[0m"
   brsaneconfig3 -a name=SCANNER model=DCP-9010CN ip=192.168.178.21 echo "\033[500C\033[4D\033[1;32mOK\033[0m"
   dpkg -l | grep Brother
   brsaneconfig3 -q | grep SCANNER
   rm -rf $HOME/DCP-9010CN && echo "\033[1;32mTreiber wurden erfolgreich installiert \033[0m"
   exit 1
else
   echo "\033[1;31mTreiber konnten nicht installiert werden \033[0m"
   exit 1
fi



Gruß postkutscher
Title: RE: Skript für Treiberinstallation Brother DCP-9010CN
Post by: piper on 2013/04/03, 19:00:19
Danke, werde ich versuchen, für den mfc 420 ändern

Thank you, I will try and  modify for the mfc 420
Title: RE: Skript für Treiberinstallation Brother DCP-9010CN
Post by: postkutscher on 2013/04/03, 20:09:46
Hallo piper,

ja, mach das. Es wäre schön, wenn es klappt.

Ich werde das ins wiki stellen, wollte nur vorher noch noch ein paar Meinungen dazu haben.

translated with google:

yes, it'll do it would be nice if it works out.

I will post to the wiki, just wanted to have a few more before that opinions about it.

Gruß postkutscher
Title: Skript für Treiberinstallation Brother DCP-9010CN
Post by: postkutscher on 2013/09/25, 12:19:32
Hi,


habe es endlich mal geschafft, das script ins wiki zu stellen.  :D

siehe

 http://wiki.siduction.de/index.php?title=Brother_DCP-9010CN_Drucker/Scanner

Gruß postkutscher
Title: Skript für Treiberinstallation Brother DCP-9010CN
Post by: piper on 2013/09/25, 16:35:47
danke !