Commit 7d1645f8 authored by testing testuser's avatar testing testuser

Adds options to C4503 driver, updates C4502 driver, execs printer install script

parent 62327b5f
......@@ -67,5 +67,5 @@ rm MacPass.zip
# download printers, install
# when domain-joined adding printers is easy
# ./mac_install_printers.sh
./mac_install_printers.sh
......@@ -4,7 +4,12 @@
# Check if the RICOH driver is present
# Install it it's not found
if [ ! -f /Library/Printers/PPDs/Contents/Resources/RICOH\ Aficio\ MP\ C4502A ];
c4502path='/Library/Printers/PPDs/Contents/Resources/RICOH Aficio MP C4502A.gz'
c4502finisher='/Library/Printers/PPDs/Contents/Resources/RICOH Aficio MP C4502A Finisher.gz'
c4503path='/Library/Printers/PPDs/Contents/Resources/RICOH MP C4503.gz'
c4503finisher='/Library/Printers/PPDs/Contents/Resources/RICOH MP C4503 Finisher.gz'
if [ ! -f "$c4502path" ] || [ ! -f "$c4503path" ];
then
# Check osx version and if Snow Leopard or less don't use dfs
# macversion=`sw_vers -productVersion | cut -d "." -f 2`
......@@ -15,7 +20,6 @@ then
# fi
# Download the printer files for Mac
curl -o ~/ricoh.pkg https://git.ist.ac.at/support/software/raw/master/ricoh-printer-drivers.pkg > /dev/null 2>&1
# curl -o ~/ricoh.pkg http://lserv44.ista.local/mac/$file > /dev/null 2>&1
# If fails it probably means that the network is not connected and send an error message to the user.
if [ ! $? == 0 ];
then
......@@ -40,31 +44,41 @@ then
sudo -S installer -pkg ~/ricoh.pkg -target / > /dev/null 2>&1
fi
# Verify that we have a special driver with the finisher
if [ ! -f /Library/Printers/PPDs/Contents/Resources/RICOH\ Aficio\ MP\ C4502A\ Finisher ];
# Verify that we have a special driver with the options
# finisher SR3110 (FinEUPHRATESFBK) for c4502a
# DefaultOptionTray -> 2Cassette (lower paper trays)
if [ ! -f "$c4502finisher" ];
then
sudo cp -p /Library/Printers/PPDs/Contents/Resources/RICOH\ Aficio\ MP\ C4502A /Library/Printers/PPDs/Contents/Resources/RICOH\ Aficio\ MP\ C4502A\ Finisher
sudo sed -i '' 's/DefaultFinisher: NotInstalled/DefaultFinisher: FinEUPHRATESFBK/g' /Library/Printers/PPDs/Contents/Resources/RICOH\ Aficio\ MP\ C4502A\ Finisher
sudo cp -p "$c4502path" "$c4502finisher"
sudo gunzip -v "$c4502finisher"
sudo sed -i '' 's/DefaultFinisher: NotInstalled/DefaultFinisher: FinEUPHRATESFBK/g' "$c4502path" Finisher
sudo sed -i '' 's/DefaultOptionTray: NotInstalled/DefaultOptionTray: 2Cassette/g' "$c4502path" Finisher
sudo gzip -v "$c4502path"\ Finisher
fi
# DefaultOptionTray -> 2Cassette
# DefaultFinisher: FinAMURBK
# gunzip < file.gz | sed -e 's/search_str/replace_str/g' | gzip -c > temp.gz
# http://www.unix.com/shell-programming-and-scripting/138822-how-substitute-large-gz-file.html
# Verify that we have a special driver with the options
# finisher SR3150 (FinAMURBK) for c4503
# DefaultOptionTray -> 2Cassette (lower paper trays)
if [ ! -f "$c4503finisher" ];
then
sudo cp -p "$c4503path" "$c4503finisher"
sudo gunzip -v "$c4503finisher"
sudo sed -i '' 's/DefaultFinisher: NotInstalled/DefaultFinisher: FinAMURBK/g' "$c4503path"\ Finisher
sudo sed -i '' 's/DefaultOptionTray: NotInstalled/DefaultOptionTray: 2Cassette/g' "$c4503path"\ Finisher
sudo gzip -v "$c4503path"\ Finisher
fi
# Add the printers to the MAC. Should we loop through a file? Maybe... let's see
sudo lpadmin -p printer-I01-1st -D "Central Building 1st floor" -L "Central Building 1st floor" -E -v socket://p0117101.ista.local:9100 -P /Library/Printers/PPDs/Contents/Resources/RICOH\ Aficio\ MP\ C4502A\ Finisher -o printer-is-shared=false
sudo lpadmin -p printer-I01-2nd -D "Central Building 2nd floor" -L "Central Building 2nd floor" -E -v socket://p0117102.ista.local:9100 -P /Library/Printers/PPDs/Contents/Resources/RICOH\ Aficio\ MP\ C4502A\ Finisher -o printer-is-shared=false
sudo lpadmin -p printer-I01-3rd -D "Central Building 3rd floor" -L "Central Building 3rd floor" -E -v socket://p0117103.ista.local:9100 -P /Library/Printers/PPDs/Contents/Resources/RICOH\ Aficio\ MP\ C4502A\ Finisher -o printer-is-shared=false
sudo lpadmin -p printer-I04-1st -D "Bertalanffy Building 1st floor" -L "Bertalanffy Building 1st floor" -E -v socket://p0417101.ista.local:9100 -P /Library/Printers/PPDs/Contents/Resources/RICOH\ Aficio\ MP\ C4502A\ Finisher -o printer-is-shared=false
sudo lpadmin -p printer-I04-2nd -D "Bertalanffy Building 2nd floor" -L "Bertalanffy Building 2nd floor" -E -v socket://p0417102.ista.local:9100 -P /Library/Printers/PPDs/Contents/Resources/RICOH\ Aficio\ MP\ C4502A\ Finisher -o printer-is-shared=false
sudo lpadmin -p printer-I04-3rd -D "Bertalanffy Building 3rd floor" -L "Bertalanffy Building 3rd floor" -E -v socket://p0417103.ista.local:9100 -P /Library/Printers/PPDs/Contents/Resources/RICOH\ Aficio\ MP\ C4502A\ Finisher -o printer-is-shared=false
sudo lpadmin -p printer-I03-gf -D "Admin Building ground floor" -L "Admin Building ground floor" -E -v socket://p0317100.ista.local:9100 -P /Library/Printers/PPDs/Contents/Resources/RICOH\ Aficio\ MP\ C4502A\ Finisher -o printer-is-shared=false
sudo lpadmin -p printer-I03-1st -D "Admin Building 1st floor" -L "Admin Building 1st floor" -E -v socket://p0317101.ista.local:9100 -P /Library/Printers/PPDs/Contents/Resources/RICOH\ Aficio\ MP\ C4502A\ Finisher -o printer-is-shared=false
sudo lpadmin -p printer-I06-1st -D "Lab Building East 1st floor" -L "Lab Building East 1st floor" -E -v socket://p0617101.ista.local:9100 -P /Library/Printers/PPDs/Contents/Resources/RICOH\ Aficio\ MP\ C4502A\ Finisher -o printer-is-shared=false
sudo lpadmin -p printer-I06-2nd -D "Lab Building East 2nd floor" -L "Lab Building East 2nd floor" -E -v socket://p0617101.ista.local:9100 -P /Library/Printers/PPDs/Contents/Resources/RICOH\ Aficio\ MP\ C4502A\ Finisher -o printer-is-shared=false
sudo lpadmin -p printer-I01-student -D "Central Building students office" -L "Central Building students office 3rd floor" -E -v socket://p0117018.ista.local:9100 -P /Library/Printers/PPDs/Contents/Resources/RICOH\ Aficio\ MP\ C3002 -o printer-is-shared=false
sudo lpadmin -p printer-I01-1st -D "Central Building 1st floor" -L "Central Building 1st floor" -E -v socket://p0117101.ista.local:9100 -P "$c4502finisher" -o printer-is-shared=false
sudo lpadmin -p printer-I01-2nd -D "Central Building 2nd floor" -L "Central Building 2nd floor" -E -v socket://p0117102.ista.local:9100 -P "$c4502finisher" -o printer-is-shared=false
sudo lpadmin -p printer-I01-3rd -D "Central Building 3rd floor" -L "Central Building 3rd floor" -E -v socket://p0117103.ista.local:9100 -P "$c4502finisher" -o printer-is-shared=false
sudo lpadmin -p printer-I04-1st -D "Bertalanffy Building 1st floor" -L "Bertalanffy Building 1st floor" -E -v socket://p0417101.ista.local:9100 -P "$c4502finisher" -o printer-is-shared=false
sudo lpadmin -p printer-I04-2nd -D "Bertalanffy Building 2nd floor" -L "Bertalanffy Building 2nd floor" -E -v socket://p0417102.ista.local:9100 -P "$c4502finisher" -o printer-is-shared=false
sudo lpadmin -p printer-I04-3rd -D "Bertalanffy Building 3rd floor" -L "Bertalanffy Building 3rd floor" -E -v socket://p0417103.ista.local:9100 -P "$c4502finisher" -o printer-is-shared=false
sudo lpadmin -p printer-I03-gf -D "Admin Building ground floor" -L "Admin Building ground floor" -E -v socket://p0317100.ista.local:9100 -P "$c4502finisher" -o printer-is-shared=false
sudo lpadmin -p printer-I03-1st -D "Admin Building 1st floor" -L "Admin Building 1st floor" -E -v socket://p0317101.ista.local:9100 -P "$c4502finisher" -o printer-is-shared=false
sudo lpadmin -p printer-I06-1st -D "Lab Building East 1st floor" -L "Lab Building East 1st floor" -E -v socket://p0617101.ista.local:9100 -P "$c4502finisher" -o printer-is-shared=false
sudo lpadmin -p printer-I06-2nd -D "Lab Building East 2nd floor" -L "Lab Building East 2nd floor" -E -v socket://p0617101.ista.local:9100 -P "$c4502finisher" -o printer-is-shared=false
sudo lpadmin -p printer-I21-gf -D "Office Building West ground floor" -L "Office Building West ground floor" -E -v socket://p2117100.ista.local:9100 -P "$c4503finisher" -o printer-is-shared=false
rm -f ~/ricoh.pkg
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment