<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Linux Forum &mdash; Посоветуйте с установкой МФУ xerox workcеntre pe 220]]></title>
	<link rel="self" href="https://linuxforum.ru/extern.php?action=feed&amp;tid=20131&amp;type=atom" />
	<updated>2012-02-10T08:55:36Z</updated>
	<generator>PunBB</generator>
	<id>https://linuxforum.ru/viewtopic.php?id=20131</id>
		<entry>
			<title type="html"><![CDATA[Re: Посоветуйте с установкой МФУ xerox workcеntre pe 220]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=249847#p249847" />
			<content type="html"><![CDATA[<p>Спасибо! Нашел! :rolleyes:</p>]]></content>
			<author>
				<name><![CDATA[Andrey271064]]></name>
				<uri>https://linuxforum.ru/profile.php?id=21984</uri>
			</author>
			<updated>2012-02-10T08:55:36Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=249847#p249847</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Посоветуйте с установкой МФУ xerox workcеntre pe 220]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=249828#p249828" />
			<content type="html"><![CDATA[<p>МСС- центр управления мандривой(Настройка компьютера), все там. И принтеры и сканеры и звук и т.д.</p>]]></content>
			<author>
				<name><![CDATA[Gnom]]></name>
				<uri>https://linuxforum.ru/profile.php?id=2577</uri>
			</author>
			<updated>2012-02-10T07:58:46Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=249828#p249828</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Посоветуйте с установкой МФУ xerox workcеntre pe 220]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=249806#p249806" />
			<content type="html"><![CDATA[<p>А подскажите в какой папке можно посмотреть какое оборудование установлено и драйвера к нему? Или это не одна папка а вразных по немногу?</p>]]></content>
			<author>
				<name><![CDATA[Andrey271064]]></name>
				<uri>https://linuxforum.ru/profile.php?id=21984</uri>
			</author>
			<updated>2012-02-10T06:49:40Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=249806#p249806</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Посоветуйте с установкой МФУ xerox workcеntre pe 220]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=249804#p249804" />
			<content type="html"><![CDATA[<p>Огромное спасибо!!! smile&nbsp; Все печатает.Сейчас буду разбираться со сканером <img src="https://linuxforum.ru/img/smilies/ag.gif" alt="ag" /></p>]]></content>
			<author>
				<name><![CDATA[Andrey271064]]></name>
				<uri>https://linuxforum.ru/profile.php?id=21984</uri>
			</author>
			<updated>2012-02-10T06:48:23Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=249804#p249804</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Посоветуйте с установкой МФУ xerox workcеntre pe 220]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=249615#p249615" />
			<content type="html"><![CDATA[<p>Файл должен быть текстовый install или readme.<br />А так запускай на установку install.sh<br />Распакуй архив, через консоль зайди в эту папку<br /><div class="termtitle" style="font-family: sans-serif; position:relative; height:auto; width:auto; background:#3A4061; color:#FFFFFF; padding: 1px;"><b> Консоль:</b></div>
<div class="termcont" style="font-family: Terminus; position:relative; height:auto; width:auto; overflow-x:scroll; white-space: nowrap ; overflow-y:auto;background:#000000; color:#4EF44E; line-height:1.2; padding: 3px; font-size: 1rem; max-height: 60vh">cd /путь_до_папки</div><br />и запусти установку<br /><div class="termtitle" style="font-family: sans-serif; position:relative; height:auto; width:auto; background:#3A4061; color:#FFFFFF; padding: 1px;"><b> Консоль:</b></div>
<div class="termcont" style="font-family: Terminus; position:relative; height:auto; width:auto; overflow-x:scroll; white-space: nowrap ; overflow-y:auto;background:#000000; color:#4EF44E; line-height:1.2; padding: 3px; font-size: 1rem; max-height: 60vh">./install.sh</div></p>]]></content>
			<author>
				<name><![CDATA[Gnom]]></name>
				<uri>https://linuxforum.ru/profile.php?id=2577</uri>
			</author>
			<updated>2012-02-09T12:30:30Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=249615#p249615</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Посоветуйте с установкой МФУ xerox workcеntre pe 220]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=249604#p249604" />
			<content type="html"><![CDATA[<p>а как через ММС настраивать? научите, если не очень сложно :o</p>]]></content>
			<author>
				<name><![CDATA[Andrey271064]]></name>
				<uri>https://linuxforum.ru/profile.php?id=21984</uri>
			</author>
			<updated>2012-02-09T11:43:51Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=249604#p249604</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Посоветуйте с установкой МФУ xerox workcеntre pe 220]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=249603#p249603" />
			<content type="html"><![CDATA[<p>есть еще один,наверное этот нужен pe220.install</p><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header" data-lang-open="открыть спойлер" data-lang-close="скрыть спойлер"><strong>+</strong>&nbsp;открыть спойлер</div><div class="fancy_spoiler"><div class="codebox"><pre><code>#!/bin/sh
# Installation script for Xerox WorkCentre PE220 Series Driver version 1.0.
# Produced using ESP Package Manager v3.3.0; report problems to epm@easysw.com.
#%product Xerox WorkCentre PE220 Series Driver
#%vendor Xerox (c)
#%copyright Xerox (c)
#%version 1.0 1000001
#%description Xerox WorkCentre PE220 Series CUPS printer configuration file.
#%rootsize 0
#%usrsize 358
#
PATH=/usr/xpg4/bin:/bin:/usr/bin:/usr/ucb:${PATH}
SHELL=/bin/sh
if test &quot;`id -u`&quot; != &quot;0&quot;; then
    echo Sorry, you must be root to install this software.
    exit 1
fi
echo &#039;Copyright Xerox (c)&#039;
# Reset umask for install...
umask 002
# Determine correct echo options...
if (echo &quot;testing\c&quot;; echo 1,2,3) | grep c &gt;/dev/null; then
    ac_n=-n
    ac_c=
else
    ac_n=
    ac_c=&#039;\c&#039;
fi
# Determine correct extract options for the tar command...
if test `uname` = Darwin; then
    ac_tar=&quot;tar -xpPf&quot;
else if test &quot;`tar --help 2&gt;&amp;1 | grep GNU`&quot; = &quot;&quot;; then
    ac_tar=&quot;tar -xpf&quot;
else
    ac_tar=&quot;tar -xpPf&quot;
fi fi
if test &quot;$*&quot; = &quot;now&quot;; then
    echo Software license silently accepted via command-line option.
else
    echo &quot;&quot;
    echo This installation script will install the &#039;Xerox WorkCentre PE220 Series Driver&#039;
    echo software version &#039;1.0&#039; on your system.
    echo &quot;&quot;
    while true ; do
        echo $ac_n &quot;Do you wish to continue? $ac_c&quot;
        read yesno
        case &quot;$yesno&quot; in
            y | yes | Y | Yes | YES)
            break
            ;;
            n | no | N | No | NO)
            exit 1
            ;;
            *)
            echo Please enter yes or no.
            ;;
        esac
    done
    more pe220.license
    echo &quot;&quot;
    while true ; do
        echo $ac_n &quot;Do you agree with the terms of this license? $ac_c&quot;
        read yesno
        case &quot;$yesno&quot; in
            y | yes | Y | Yes | YES)
            break
            ;;
            n | no | N | No | NO)
            exit 1
            ;;
            *)
            echo Please enter yes or no.
            ;;
        esac
    done
fi
if test -x /etc/software/pe220.remove; then
    echo Removing old versions of pe220 software...
    /etc/software/pe220.remove now
fi
case `uname` in
    AIX)
    dfroot=`df -k / | tr &#039;\n&#039; &#039; &#039;`
    dfusr=`df -k /usr | tr &#039;\n&#039; &#039; &#039;`
    fsroot=`echo $dfroot | awk &#039;{print $15}&#039;`
    sproot=`echo $dfroot | awk &#039;{print $11}&#039;`
    fsusr=`echo $dfusr | awk &#039;{print $15}&#039;`
    spusr=`echo $dfusr | awk &#039;{print $11}&#039;`
    ;;

    HP-UX)
    dfroot=`df -k / | tr &#039;\n&#039; &#039; &#039;`
    dfusr=`df -k /usr | tr &#039;\n&#039; &#039; &#039;`
    fsroot=`echo $dfroot | awk &#039;{print $1}&#039;`
    sproot=`echo $dfroot | awk &#039;{print $9}&#039;`
    fsusr=`echo $dfusr | awk &#039;{print $1}&#039;`
    spusr=`echo $dfusr | awk &#039;{print $9}&#039;`
    ;;

    IRIX*)
    dfroot=`df -k / | tr &#039;\n&#039; &#039; &#039;`
    dfusr=`df -k /usr | tr &#039;\n&#039; &#039; &#039;`
    fsroot=`echo $dfroot | awk &#039;{print $15}&#039;`
    sproot=`echo $dfroot | awk &#039;{print $13}&#039;`
    fsusr=`echo $dfusr | awk &#039;{print $15}&#039;`
    spusr=`echo $dfusr | awk &#039;{print $13}&#039;`
    ;;

    SCO*)
    dfroot=`df -k -B / | tr &#039;\n&#039; &#039; &#039;`
    dfusr=`df -k -B /usr | tr &#039;\n&#039; &#039; &#039;`
    fsroot=`echo $dfroot | awk &#039;{print $13}&#039;`
    sproot=`echo $dfroot | awk &#039;{print $11}&#039;`
    fsusr=`echo $dfusr | awk &#039;{print $13}&#039;`
    spusr=`echo $dfusr | awk &#039;{print $11}&#039;`
    ;;

    *)
    dfroot=`df -k / | tr &#039;\n&#039; &#039; &#039;`
    dfusr=`df -k /usr | tr &#039;\n&#039; &#039; &#039;`
    fsroot=`echo $dfroot | awk &#039;{print $13}&#039;`
    sproot=`echo $dfroot | awk &#039;{print $11}&#039;`
    fsusr=`echo $dfusr | awk &#039;{print $13}&#039;`
    spusr=`echo $dfusr | awk &#039;{print $11}&#039;`
    ;;
esac

temp=`ls -ln pe220.sw | awk &#039;{print $5}&#039;`
spsw=`expr $temp / 1024`

temp=`ls -ln pe220.ss | awk &#039;{print $5}&#039;`
spss=`expr $temp / 1024`

spall=`expr $spsw + $spss`

if test x$sproot = x -o x$spusr = x; then
    echo WARNING: Unable to determine available disk space; installing blindly...
else
    if test x$fsroot = x$fsusr; then
        if test $spall -gt $sproot; then
            echo Not enough free disk space for software:
            echo You need $spall kbytes but only have $sproot kbytes available.
            exit 1
        fi
    else
        if test $spsw -gt $sproot; then
            echo Not enough free disk space for software:
            echo You need $spsw kbytes in / but only have $sproot kbytes available.
            exit 1
        fi

        if test $spss -gt $spusr; then
            echo Not enough free disk space for software:
            echo You need $spss kbytes in /usr but only have $spusr kbytes available.
            exit 1
        fi
    fi
fi
if test -w /usr ; then
    echo Backing up old versions of shared files to be installed...
    for file in /usr/lib/sane/libsane-xerox_pe220.so /usr/lib/sane/libsane-xerox_pe220.so.1 /usr/lib/sane/libsane-xerox_pe220.so.1.0.1 \
/usr/local/bin/xerox/pe220.version /usr/local/lib/sane/libsane-xerox_pe220.so /usr/local/lib/sane/libsane-xerox_pe220.so.1 \
/usr/local/lib/sane/libsane-xerox_pe220.so.1.0.1 /usr/share/cups/model/xerox/pe220.ppd; do
        if test -d $file -o -f $file -o -h $file; then
            mv -f $file $file.O
        fi
    done
fi
echo Installing software...
$ac_tar pe220.sw
if echo Write Test &gt;/usr/.writetest 2&gt;/dev/null; then
rm -f /usr/.writetest
    $ac_tar pe220.ss
fi
if test -d /etc/software; then
    rm -f /etc/software/pe220.remove
else
    mkdir -p /etc/software
fi
cp pe220.remove /etc/software
chmod 544 /etc/software/pe220.remove
echo Running post-install commands...
#! /bin/sh
#
#    pe220 postinstall script
#

##################################################################################################
#    Defines

PRINTER_NAME=pe220

if [ &quot;$XEROXMFP_INSTALL_DIR&quot; == &quot;&quot; ] ; then
    XEROXMFP_INSTALL_DIR=/usr/local/bin/xerox
fi
DRIVERS_REG_DIR=$XEROXMFP_INSTALL_DIR/drivers
DRIVERS_REG_FILE=$DRIVERS_REG_DIR/installed_software
DRIVER_REG_DIR=$DRIVERS_REG_DIR/$PRINTER_NAME

FIRMWARE_DEVICE_NAME=&quot;WorkCentre PE220 Series&quot;

source ../../set_variables.sh ../../OEM.ini

VENDOR=&quot;Xerox&quot;
ISSUE=`cat /etc/issue 2&gt;/dev/null`
LINUX_DIST=
if   ( echo $ISSUE | grep -q &quot;Red Hat Linux release 8&quot; ); then
    LINUX_DIST=&quot;REDHAT_8&quot;
elif ( echo $ISSUE | grep -q &quot;Red Hat Linux release 9&quot; ); then
    LINUX_DIST=&quot;REDHAT_9&quot;
elif ( echo $ISSUE | grep -q &quot;Fedora&quot; ); then
    LINUX_DIST=&quot;FEDORA&quot;
fi

#    Defines
##################################################################################################

# Register scanner
CUR_PWD=$PWD
SANE_CONFIG_LOCATIONS=&quot;/etc/sane.d /usr/local/etc/sane.d&quot;
for SANE_CONFIG_LOCATION in $SANE_CONFIG_LOCATIONS ; do
    if [ -w ${SANE_CONFIG_LOCATION}/dll.conf ] ; then
        if ! test -e ${SANE_CONFIG_LOCATION}/xerox_$PRINTER_NAME.dll.conf; then
            cd &quot;${SANE_CONFIG_LOCATION}&quot;
            echo &quot;&quot; &gt;&gt; dll.conf
            echo &quot;xerox_$PRINTER_NAME&quot; | cat dll.conf - | tr -s [&quot;\n&quot;] &gt; xerox_$PRINTER_NAME.dll.conf
            cp -b -f xerox_$PRINTER_NAME.dll.conf dll.conf
            chmod 664 dll.conf
        fi
    fi
done
cd &quot;$CUR_PWD&quot;

# Install 64-bit sane backend begin {

if [ &quot;$PLSFX&quot; == &quot;64&quot; ]; then
    mkdir -p /usr/lib64/sane
    cp -a /usr/local/bin/${VENDOR_LC}/x86_64/libsane-${VENDOR_LC}_${PRINTER_NAME}.so.1.0.1 /usr/lib64/sane/
    ( cd /usr/lib64/sane &amp;&amp; \
    ln -s libsane-${VENDOR_LC}_${PRINTER_NAME}.so.1.0.1 libsane-${VENDOR_LC}_${PRINTER_NAME}.so.1 ; \
    ln -s libsane-${VENDOR_LC}_${PRINTER_NAME}.so.1.0.1 libsane-${VENDOR_LC}_${PRINTER_NAME}.so )
fi

# Install 64-bit sane backend end   }

##################################################################################################
##    Printer ppd file

gzip -f /usr/share/cups/model/xerox/$PRINTER_NAME.ppd &gt; /dev/null 2&gt;/dev/null

##    Printer ppd file
##################################################################################################

##################################################################################################
##    Install printer

#if [ -x /etc/rc.d/init.d/cups ] ; then
#    CUPS_SCRIPT=/etc/rc.d/init.d/cups
#else
#    CUPS_SCRIPT=/etc/init.d/cups
#fi
#echo DEBUG: CUPS_SCRIPT=$CUPS_SCRIPT
#CUPS_RUNNING=0
#if [ &quot;$CUPS_SCRIPT&quot; != &quot;&quot; ] &amp;&amp; ( $CUPS_SCRIPT status 2&gt;/dev/null | grep running &gt;/dev/null 2&gt;/dev/null ) ; then
#    CUPS_RUNNING=1
#fi
#echo DEBUG: CUPS_RUNNING=$CUPS_RUNNING
#
#if ( service cups status 2&gt;/dev/null | grep running &gt;/dev/null 2&gt;/dev/null ) ; then
#    CUPS_RUNNING=1
#fi
#if ! [ $CUPS_RUNNING -eq 1 ] ; then
#    if [ -e /etc/init.d/cups ]; then
#        if  ; then
#            CUPS_RUNNING=1
#        fi
#    fi
#fi
#if ! [ $CUPS_RUNNING -eq 1 ] ; then
#    if ! ( ps -e | grep cupsd &gt;/dev/null 2&gt;/dev/null ) ; then
#        `cupsd 2&gt;/dev/null`
#    fi
#    if ( ps -e | grep cupsd &gt;/dev/null 2&gt;/dev/null ) ; then
#        CUPS_RUNNING=1
#    fi
#fi

if [ &quot;`ps ax | awk &#039;{print $1,$5}&#039; | grep cupsd | awk &#039;{print $1}&#039;`&quot; == &quot;&quot; ] ; then
    cupsd &gt;/dev/null 2&gt;/dev/null
    ./isCupsOn 631 60 &gt;/dev/null 2&gt;/dev/null
fi
CUPS_RUNNING=1
if [ $CUPS_RUNNING -eq 1 ] ; then
    echo    Adding printer...
    #    Add printer
    read -t 1
    #    Get device port
    DEVICE_PORT=
    DEVICE_LINE=`/usr/lib${PLSFX}/cups/backend/mfp 2&gt;/dev/null | grep &quot;$FIRMWARE_DEVICE_NAME&quot; | head -n 1`
    echo DEBUG: pe220.post.sh: DEVICE_LINE=$DEVICE_LINE
    if [ &quot;$DEVICE_LINE&quot; != &quot;&quot; ] ; then
        DEVICE_PORT=`echo $DEVICE_LINE | awk &#039;{print $2}&#039; -`
    fi
    echo DEBUG: pe220.post.sh: DEVICE_PORT=$DEVICE_PORT
    if [ &quot;$DEVICE_PORT&quot; != &quot;&quot; ] ; then
        echo DEBUG: Printer install string=lpadmin -p $PRINTER_NAME -m xerox/$PRINTER_NAME.ppd.gz -v $DEVICE_PORT
        lpadmin -p $PRINTER_NAME -m xerox/$PRINTER_NAME.ppd.gz -v $DEVICE_PORT
    else
        echo DEBUG: Printer install string=lpadmin -p $PRINTER_NAME -m xerox/$PRINTER_NAME.ppd.gz -v mfp:/dev/mfp0
        lpadmin -p $PRINTER_NAME -m xerox/$PRINTER_NAME.ppd.gz -v mfp:/dev/mfp0
    fi
    
#    if ( /usr/lib${PLSFX}/cups/backend/mfp 2&gt;/dev/null | grep &quot;Xerox MFP USB Port&quot; &gt;/dev/null ) ; then
#        DEVICE_PORT=`/usr/lib${PLSFX}/cups/backend/mfp 2&gt;/dev/null | grep &quot;Xerox MFP USB Port&quot; | awk &#039;{print $2}&#039; -`
#        if [ &quot;$DEVICE_PORT&quot; != &quot;&quot; ] ; then
#            lpadmin -p $PRINTER_NAME -m xerox/$PRINTER_NAME.ppd.gz -v $DEVICE_PORT
#        else
#            lpadmin -p $PRINTER_NAME -m xerox/$PRINTER_NAME.ppd.gz -v mfp:/dev/mfp4
#        fi
#    else
#        DEVICE_PORT=`/usr/lib${PLSFX}/cups/backend/mfp 2&gt;/dev/null | grep &quot;Xerox MFP Parallel Port&quot; | awk &#039;{print $2}&#039; -`
#        if [ &quot;$DEVICE_PORT&quot; != &quot;&quot; ] ; then
#            lpadmin -p $PRINTER_NAME -m xerox/$PRINTER_NAME.ppd.gz -v $DEVICE_PORT
#        else
#            lpadmin -p $PRINTER_NAME -m xerox/$PRINTER_NAME.ppd.gz -v mfp:/dev/mfp0
#        fi
#    fi

    #    Enable printer
    read -t 1
    lpadmin -p $PRINTER_NAME -E
    #    Make printer default
    read -t 1
    lpadmin -d $PRINTER_NAME
    #    Set options if printer has not been installed
    if [ &quot;__MFP_OVERWRITE_DRIVER__&quot; != &quot;1&quot; ] ; then    # Preserve existing driver options
        echo DEBUG: Setting SCALING option to printer=$PRINTER_NAME
        lpoptions -p $PRINTER_NAME -o scaling=100 -o page-left=13 -o page-top=13 -o page-right=13 -o page-bottom=13
    fi
fi

##    Install printer
##################################################################################################

##################################################################################################
##    Restart (or start) CUPS

echo &quot;Initializing CUPS drivers...&quot;
if [ -x /etc/rc.d/init.d/cups ] ; then
    CUPS_SCRIPT=/etc/rc.d/init.d/cups
else
    CUPS_SCRIPT=/etc/init.d/cups
fi
echo DEBUG: CUPS_SCRIPT=$CUPS_SCRIPT
if [ -x $CUPS_SCRIPT ]; then
    $CUPS_SCRIPT restart &gt;/dev/null 2&gt;/dev/null
else
    cups_pid=`ps ax | awk &#039;{print $1,$5}&#039; | grep cupsd | awk &#039;{print $1}&#039;`
    echo DEBUG: cups_pid=$cups_pid
    if [ $cups_pid != &quot;&quot; ] ; then
        kill $cups_pid
    fi
    cupsd &gt;/dev/null 2&gt;/dev/null
fi
if ./isCupsOn 631 60 &gt;/dev/null 2&gt;/dev/null ; then
    echo &quot;done.&quot;
fi

##    Restart (or start) CUPS
##################################################################################################

##################################################################################################
##    System menu

# Create Xerox menu items

if [ &quot;$LINUX_DIST&quot; == &quot;REDHAT_8&quot; -o &quot;$LINUX_DIST&quot; == &quot;REDHAT_9&quot; ] ; then
    APPLNK_FILE=&quot;/usr/share/applications/Uninstall_$PRINTER_NAME.desktop&quot;
    if [ -f &quot;$APPLNK_FILE&quot; ] ; then
        rm -f &quot;$APPLNK_FILE&quot;
    fi
    echo &quot;[Desktop Entry]&quot;                                                        &gt; &quot;$APPLNK_FILE&quot;
    echo &quot;Name=Uninstall WorkCentre PE220 Series&quot;                                                &gt;&gt; &quot;$APPLNK_FILE&quot;
    echo &quot;Name[C]=Uninstall WorkCentre PE220 Series&quot;                                            &gt;&gt; &quot;$APPLNK_FILE&quot;
    echo &quot;Comment=WorkCentre PE220 Series driver uninstallation script&quot;                        &gt;&gt; &quot;$APPLNK_FILE&quot;
    echo &quot;Comment[C]=WorkCentre PE220 Series driver uninstallation script&quot;                    &gt;&gt; &quot;$APPLNK_FILE&quot;
    echo &quot;Type=Application&quot;                                                        &gt;&gt; &quot;$APPLNK_FILE&quot;
#    echo &quot;Exec=sh /usr/local/bin/xerox/drivers/$PRINTER_NAME.uninstall.sh&quot;    &gt;&gt; &quot;$APPLNK_FILE&quot;
    echo &quot;Exec=/usr/local/bin/xerox/uninstall -p /usr/local/bin/xerox/drivers -e ./$PRINTER_NAME.uninstall.sh&quot;    &gt;&gt; &quot;$APPLNK_FILE&quot;
    echo &quot;Path=/usr/local/bin/xerox/drivers/&quot;                                    &gt;&gt; &quot;$APPLNK_FILE&quot;
    echo &quot;Icon=/usr/share/icons/Uninstall.png&quot;                                    &gt;&gt; &quot;$APPLNK_FILE&quot;
    echo &quot;Terminal=0&quot;                                                            &gt;&gt; &quot;$APPLNK_FILE&quot;
    echo &quot;TerminalOptions=&quot;                                                        &gt;&gt; &quot;$APPLNK_FILE&quot;
    echo &quot;X-KDE-SubstituteUID=false&quot;                                            &gt;&gt; &quot;$APPLNK_FILE&quot;
    echo &quot;X-KDE-Username=&quot;                                                        &gt;&gt; &quot;$APPLNK_FILE&quot;
    echo &#039;Categories=Application;SystemSetup;X-Xerox-Config;&#039;                    &gt;&gt; &quot;$APPLNK_FILE&quot;
else
MENU_LOCATION1=/usr/share/applnk
MENU_LOCATION2=/usr/share/applnk-mdk
MENU_LOCATION3=
MENU_LOCATION4=
if [ &quot;$KDEDIR&quot; != &quot;&quot; ] ; then
    MENU_LOCATION3=$KDEDIR/share/applnk
    MENU_LOCATION4=$KDEDIR/share/applnk-mdk
fi
if [ -d /usr/share/gnome/apps ] &amp;&amp; [ &quot;`ls /usr/share/gnome/apps 2&gt;/dev/null`&quot; != &quot;&quot; ] ; then
    MENU_LOCATION5=/usr/share/gnome/apps
else
    MENU_LOCATION5=/etc/X11/applnk
fi
# Remove duplicated menu entries at KDE menu in Fedora
if echo &quot;$LINUX_DIST&quot; | grep -q &quot;FEDORA&quot; ; then
    if [ &quot;$MENU_LOCATION5&quot; != &quot;&quot; ] ; then
        if [ -d &quot;$MENU_LOCATION5&quot; ] ; then
            if [ &quot;$MENU_LOCATION1&quot; ] ; then
                MENU_LOCATION1=
            fi
            if [ &quot;$MENU_LOCATION3&quot; ] ; then
                MENU_LOCATION3=
            fi
        fi
    fi
fi
MENU_LOCATION6=
if [ &quot;$KDEDIRS&quot; != &quot;&quot; ] ; then
    for kdeDir in `echo $KDEDIRS | tr &#039; &#039; &#039;|&#039; | tr &#039;:&#039; &#039; &#039; | tr &#039;|&#039; &#039; &#039;` ;
    do
        MENU_LOCATION6=&quot;$MENU_LOCATION6 $kdeDir/share/applnk&quot;
        MENU_LOCATION6=&quot;$MENU_LOCATION6 $kdeDir/share/applnk-mdk&quot;
    done
fi
for kdeDir in kde kde2 kde3 ;
do
    MENU_LOCATION6=&quot;$MENU_LOCATION6 /opt/$kdeDir/share/applnk&quot;
    MENU_LOCATION6=&quot;$MENU_LOCATION6 /opt/$kdeDir/share/applnk-mdk&quot;
done
for kdeDir in kde kde2 kde3 ;
do
    MENU_LOCATION7=&quot;$MENU_LOCATION7 /etc/opt/$kdeDir/share/applnk/SuSE&quot;
done
for MFP_APPLNKS_DIR in $MENU_LOCATION1 $MENU_LOCATION2 $MENU_LOCATION3 $MENU_LOCATION4 $MENU_LOCATION5 $MENU_LOCATION6 $MENU_LOCATION7
do
#    if [ &quot;$MFP_APPLNKS_DIR&quot; != &quot;&quot; ] ; then
    echo DEBUG: $PRINTER_NAME.post.sh: MENU dir: MFP_APPLNKS_DIR=$MFP_APPLNKS_DIR - menu to be installed
    if [ -d &quot;$MFP_APPLNKS_DIR&quot; ] &amp;&amp; mkdir -p &quot;$MFP_APPLNKS_DIR/Xerox_MFP&quot; ; then
    echo DEBUG: $PRINTER_NAME.post.sh: MENU dir: MFP_APPLNKS_DIR=$MFP_APPLNKS_DIR - MENU IS INSTALLED
    
#    if ! [ -d &quot;$MFP_APPLNKS_DIR&quot; ] ; then
#        mkdir -p &quot;$MFP_APPLNKS_DIR&quot;
#    fi

    APPLNK_FILE=&quot;$MFP_APPLNKS_DIR&quot;/Xerox_MFP/Uninstall_$PRINTER_NAME.desktop
    if [ -f &quot;$APPLNK_FILE&quot; ] ; then
        rm -f &quot;$APPLNK_FILE&quot;
    fi
    echo &quot;[Desktop Entry]&quot;                                                        &gt; &quot;$APPLNK_FILE&quot;
    echo &quot;Name=Uninstall WorkCentre PE220 Series&quot;                                                &gt;&gt; &quot;$APPLNK_FILE&quot;
    echo &quot;Name[C]=Uninstall WorkCentre PE220 Series&quot;                                            &gt;&gt; &quot;$APPLNK_FILE&quot;
    echo &quot;Comment=WorkCentre PE220 Series driver uninstallation script&quot;                        &gt;&gt; &quot;$APPLNK_FILE&quot;
    echo &quot;Comment[C]=WorkCentre PE220 Series driver uninstallation script&quot;                    &gt;&gt; &quot;$APPLNK_FILE&quot;
    echo &quot;Type=Application&quot;                                                        &gt;&gt; &quot;$APPLNK_FILE&quot;
#    echo &quot;Exec=sh /usr/local/bin/xerox/drivers/$PRINTER_NAME.uninstall.sh&quot;    &gt;&gt; &quot;$APPLNK_FILE&quot;
    echo &quot;Exec=/usr/local/bin/xerox/uninstall -p /usr/local/bin/xerox/drivers -e ./$PRINTER_NAME.uninstall.sh&quot;    &gt;&gt; &quot;$APPLNK_FILE&quot;
    echo &quot;Path=/usr/local/bin/xerox/drivers/&quot;                                    &gt;&gt; &quot;$APPLNK_FILE&quot;
    echo &quot;Icon=/usr/share/icons/Uninstall.png&quot;                                    &gt;&gt; &quot;$APPLNK_FILE&quot;
    echo &quot;Terminal=0&quot;                                                            &gt;&gt; &quot;$APPLNK_FILE&quot;
    echo &quot;TerminalOptions=&quot;                                                        &gt;&gt; &quot;$APPLNK_FILE&quot;
    echo &quot;X-KDE-SubstituteUID=false&quot;                                            &gt;&gt; &quot;$APPLNK_FILE&quot;
    echo &quot;X-KDE-Username=&quot;                                                        &gt;&gt; &quot;$APPLNK_FILE&quot;
    
    fi
done

fi

##    System menu
##################################################################################################

# Register $PRINTER_NAME
mkdir -p $DRIVERS_REG_DIR
if ! grep $PRINTER_NAME $DRIVERS_REG_FILE &gt;/dev/null 2&gt;/dev/null; then
    echo    &quot;$PRINTER_NAME&quot;    &gt;&gt;    $DRIVERS_REG_FILE
fi
#mkdir -p $DRIVER_REG_DIR
#echo    &quot;1.0.1&quot;            &gt;    $DRIVER_REG_DIR/version
#echo    &quot;version: 1.0&quot;    &gt;&gt;    $DRIVER_REG_DIR/version
#echo    &quot;release: 1&quot;    &gt;&gt;    $DRIVER_REG_DIR/version
cp -f -p --target-directory=$DRIVERS_REG_DIR $PRINTER_NAME.remove
# Prepare uninstall scripts
echo &quot;#! /bin/sh&quot;                            &gt;    $DRIVERS_REG_DIR/$PRINTER_NAME.uninstall.sh
echo &quot;cd \&quot;$DRIVERS_REG_DIR\&quot;&quot;                    &gt;&gt;    $DRIVERS_REG_DIR/$PRINTER_NAME.uninstall.sh
echo &quot;sh $PRINTER_NAME.remove now&quot;            &gt;&gt;    $DRIVERS_REG_DIR/$PRINTER_NAME.uninstall.sh
echo &quot;sh mfpcommon.remove now&quot;                &gt;&gt;    $DRIVERS_REG_DIR/$PRINTER_NAME.uninstall.sh
echo &quot;rm -f $PRINTER_NAME.remove&quot;            &gt;&gt;    $DRIVERS_REG_DIR/$PRINTER_NAME.uninstall.sh
echo &quot;read -t 1&quot;                            &gt;&gt;    $DRIVERS_REG_DIR/$PRINTER_NAME.uninstall.sh
echo &quot;rm -f $PRINTER_NAME.uninstall.sh &amp;&quot;    &gt;&gt;    $DRIVERS_REG_DIR/$PRINTER_NAME.uninstall.sh
chmod 755 $DRIVERS_REG_DIR/$PRINTER_NAME.uninstall.sh

echo Installation is complete.</code></pre></div></div></div>]]></content>
			<author>
				<name><![CDATA[Andrey271064]]></name>
				<uri>https://linuxforum.ru/profile.php?id=21984</uri>
			</author>
			<updated>2012-02-09T11:40:54Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=249603#p249603</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Посоветуйте с установкой МФУ xerox workcеntre pe 220]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=249602#p249602" />
			<content type="html"><![CDATA[<p>Вот файл install.sh</p><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header" data-lang-open="открыть спойлер" data-lang-close="скрыть спойлер"><strong>+</strong>&nbsp;открыть спойлер</div><div class="fancy_spoiler"><div class="codebox"><pre><code>#! /bin/sh
#
#    MFP Driver Package Installation script.
#    Product setup script
#

cd `dirname $0`
##################################################################################################
#    Defines

source ./set_variables.sh ./OEM.ini

# VENDOR=`grep &#039;^VENDOR=&#039; OEM.ini 2&gt;/dev/null | sed &#039;s/VENDOR=\(.*\)/\1/&#039;`
# if [ -z &quot;$VENDOR&quot; ]; then
#    echo &quot;File OEM.ini does not exist or invalid&quot;
#    echo &quot;Exit installation&quot;
#    exit 1
# fi
# VENDOR_UC=`echo $VENDOR | tr a-z A-Z`
# VENDOR_LC=`echo $VENDOR | tr A-Z a-z`
#
MFP_INSTALL_DIR=/usr/local/bin/$VENDOR_LC

if [ -f /etc/slackware-version ]; then
    SLACKWARE_DETECTED=&quot;1&quot;
else
    SLACKWARE_DETECTED=&quot;0&quot;
fi

AUTORUN_INF_FILE=&#039;../autorun.inf&#039;

#    Defines
##################################################################################################

######################################################################################
#    Procedures

check_package()
{
    if [ &quot;$SLACKWARE_DETECTED&quot; == &quot;1&quot; ]; then
        result=`ls /var/log/packages/$1-* 2&gt; /dev/null`
        rv=$?
        result=`echo $result | awk -F &#039;-&#039; &#039;{print $2}&#039;`
    else
        result=`rpm -q --queryformat &#039;%{VERSION}&#039; $1 2&gt;/dev/null`
        rv=$?
    fi
    return $rv
}

#Detects if xwindow is installed
IsXWindowInstalled()
{
    status=0
    result=0

    if echo &quot;$LINUX_DIST&quot; | grep -q GUADALINEX ; then
        if ps auxw | grep -v grep | grep -wq X ; then
            result=1
        fi
    fi

    if ps -C X &gt; /dev/null; then
        result=1
    fi

    if ps auxw | grep -v grep | grep -wq XFree86 ; then
        result=1
    fi

    echo    $result

    return    $status
}

######################################################################################

#Detects if RPM is installed
IsRPMInstalled()
{
    status=1
    result=0

    rpmName=`rpm --version | head -c 11 -`
    if [ $? -eq 0 ] &amp;&amp; [ &quot;$rpmName&quot; == &quot;RPM version&quot; ]; then
        result=1
        status=0
    fi

#    echo $result

    return $status
}

######################################################################################

#Detects if CUPS is installed
IsCUPSInstalled()
{
    status=1;

    if echo &quot;$LINUX_DIST&quot; | grep -q GUADALINEX ; then
        if test -d /etc/cups -a -e /usr/sbin/cupsd ; then
            result=&quot;1.1.20&quot;
            return $status
        fi
    fi

    if ! check_package cups ; then
        result=`cups-config --version 2&gt;/dev/null`
        if [ $? -ne 0 ] &amp;&amp; ! [ -e /usr/sbin/cupsd ] ; then
            result=
        fi
    fi

#    echo $result

    return $status
}

######################################################################################

#Get GhostScript version
IsGSInstalled()
{
    status=1;

    if ! check_package ghostscript ; then
        result=`gs --version 2&gt;/dev/null`
        if [ $? -ne 0 ] ; then
            result=
        fi
    fi

#    echo $result

    return $status
}

######################################################################################

#Detects if SANE is installed
IsSANEInstalled()
{
    status=1

    if echo &quot;$LINUX_DIST&quot; | grep -q &quot;GUADALINEX\|KNOPPIX&quot; ; then
        if test -d /etc/sane.d -a -n &quot;`ls /usr/lib/libsane.so.* 2&gt; /dev/null`&quot; ; then
            result=&quot;1.0.13&quot;
            return $status
        fi
    fi

    if ! check_package sane ; then
        if ! check_package sane-backends ; then
            if ! check_package xsane ; then
                result=`sane-config --version 2&gt;/dev/null`
                if [ $? -ne 0 ] &amp;&amp; ! [ -e /usr/lib/libsane.so.1 ] ; then
                    result=
                fi
            fi
        fi
    fi

#    echo $result

    return $status
}

######################################################################################

#USAGE: compareVersions file1 file2
#Versions notation &#039;x1&#039; &#039;x1.x2&#039; &#039;x1.x2.x3&#039;
#    0 ==
#   1 &gt;
#    -1 &lt;
#    2 error
compareVersions()
{
    #    test files exists &amp; readable
    if ! [ -r $1 ] || ! [ -r $2 ] ; then
        echo    2
        return
    fi

    v11=`awk -F &#039;.&#039; &#039;{print $1}&#039; $1`
    v12=`awk -F &#039;.&#039; &#039;{print $2}&#039; $1`
    v13=`awk -F &#039;.&#039; &#039;{print $3}&#039; $1`
    v21=`awk -F &#039;.&#039; &#039;{print $1}&#039; $2`
    v22=`awk -F &#039;.&#039; &#039;{print $2}&#039; $2`
    v23=`awk -F &#039;.&#039; &#039;{print $3}&#039; $2`
    
    rm -f $1
    rm -f $2

    #    test first digits are not empty    
    if ! [ $v11 ] ||  ! [ $v21 ] ; then
        echo    2
        return
    fi
    
    if [ $v11 -gt $v21 ]; then
        echo    1
        return
    fi
    
    if [ $v11 -lt $v21 ]; then
        echo    -1
        return
    fi
    
    if [ -z $v12 ] &amp;&amp; [ -z $v22 ]; then
        echo    0
        return
    fi

    #    test second digits are not empty    
    if [ $v12 ] &amp;&amp; [ $v22 ]; then
        if [ $v12 -gt $v22 ]; then
            echo    1
            return
        fi
        if [ $v12 -lt $v22 ]; then
            echo    -1
            return
        fi
        if [ -z $v13 ] &amp;&amp; [ -z $v23 ]; then
            echo    0
            return
        fi
                
        if [ $v13 ] &amp;&amp; [ $v23 ]; then
            if [ $v13 -gt $v23 ]; then
                echo    1
                return
            fi
            if [ $v13 -lt $v23 ]; then
                echo    -1
                return
            fi
            
            echo    0
            return
        else
            if [ $v13 ] ; then
                echo    1
                return
            fi
            if [ $v23 ]; then
                echo    -1
                return
            fi
        fi
    else
        if [ $v12 ] ; then
            echo    1
            return
        fi
        if [ $v22 ]; then
            echo    -1
            return
        fi
    fi

    echo    2
    return
}

######################################################################################

#    Test digit (digit digit)
IsDigit()
{
    result=0
    
    case $1 in
        [0-9])
            result=1;;
        [0-9][0-9])
            result=1;;
        *)
            result=0;;
    esac
    
    echo    $result
    return  $result
}

######################################################################################

print_manifest()
{
    echo
    echo &quot;$1 that is required for driver package to work properly was not&quot;
    echo &quot;detected on your system. Please exit installation procedure and install&quot;
    echo &quot;$1 package from your Linux distribution CD-ROM or from Linux distribution&quot;
    echo &quot;vendor web site&quot;
    echo -e &quot;\t[1] Exit installation procedure&quot;
    echo -e &quot;\t[2] I am sure I have necessary software installed. Continue installation&quot;
}

run_menu_exit_installation()
{
    execMenu=1
    while [ $execMenu -eq 1 ]
    do
        read -p &#039;Please make your choice [1,2]: &#039; -n 1 shallInstall
        case $shallInstall in
            1)    status=1;
                exit $status;;
            2)    status=0;
                execMenu=0;;
            *)    echo -e -n &#039;\r&#039;
        esac
    done
    echo
}

do_setup()
{
    GHOSTSCRIPT_VERSION=7.05.2
    DRIVER_PATH=$1

    status=1

######################################################################################
#    Detect the Linux environment

# rpmPresent=`IsRPMInstalled`
# cupsVer=`IsCUPSInstalled`
# saneVer=`IsSANEInstalled`
# gsVer=`IsGSInstalled`

IsRPMInstalled  ; rpmPresent=$result
IsCUPSInstalled ; cupsVer=$result
IsSANEInstalled ; saneVer=$result
IsGSInstalled   ; gsVer=$result

######################################################################################
#    Make installation parameters

parCUPS=0
if [ &quot;$cupsVer&quot; != &quot;&quot; ]; then
    parCUPS=1
fi
#-------------------------------------------------------------------------------------
parSANE=0
if [ &quot;$saneVer&quot; != &quot;&quot; ]; then
    parSANE=1
fi
#-------------------------------------------------------------------------------------
parGS=0
if [ &quot;$gsVer&quot; != &quot;&quot; ]; then
    # Any version of gs is good for us now
    parGS=1
#    echo &quot;$gsVer&quot;                &gt; $TMP_DIR/dummy1$$
#    echo &quot;$GHOSTSCRIPT_VERSION&quot;    &gt; $TMP_DIR/dummy2$$
#    verCmp=`compareVersions $TMP_DIR/dummy1$$ $TMP_DIR/dummy2$$`
#    if        [ &quot;$verCmp&quot; == &quot;0&quot; ] ; then
#        parGS=1
#    elif    [ &quot;$verCmp&quot; == &quot;1&quot; ] ; then
#        parGS=1
#    elif    [ &quot;$verCmp&quot; == &quot;-1&quot; ] ; then
#        parGS=2
#    fi
fi

status=0

######################################################################################
#    Perform installation

if [ $XWINDOWINSTALLED -eq 1 ] ; then
#    LD_LIBRARY_PATH=$PWD/rd:$LD_LIBRARY_PATH
#    export LD_LIBRARY_PATH
##    ../../../mfpinstall RPM=-1 CUPS=$parCUPS QtCUPS=-1 KUPS=-1 SANE=$parSANE SCRIPTS=$PWD DRIVER=$DRIVER_PATH LANGUAGE=$LANGUAGE
#    ../../../mfpinstall CUPS=$parCUPS GS=$parGS SANE=$parSANE SCRIPTS=$PWD DRIVER=$DRIVER_PATH LANGUAGE=$LANGUAGE
    ./mfpinstall CUPS=$parCUPS GS=$parGS SANE=$parSANE SCRIPTS=$PWD DRIVER=$DRIVER_PATH LANGUAGE=$LANGUAGE
    status=$?
else
    
    #    OK. If we are here - things are really goes better. No let&#039;s make environment for and install driver package
    
    echo &#039;MFP driver package is about to be installed on your system...&#039;
    
    ############################################################################################
    #    Check CUPS
    if [ $parCUPS -ne 1 ]; then
        print_manifest &quot;CUPS&quot;
        run_menu_exit_installation
    fi
    
    ############################################################################################
    #    Check GhostScript
    if [ $parGS -ne 1 ]; then
        print_manifest &quot;GhostScript&quot;
        run_menu_exit_installation
    fi
    
    ############################################################################################
    #    Check SANE
    if [ $parSANE -ne 1 ]; then
        print_manifest &quot;SANE&quot;
        run_menu_exit_installation
    fi
    
    #    OK. We&#039;ve managed all the preparation - install driver package
    if [ $status -eq 0 ]; then
        CUR_DIR=$PWD
        cd &quot;$DRIVER_PATH&quot;
        sh drivers.sh install
        status=$?
        cd &quot;$CUR_DIR&quot;
    fi
    
    ###############################################################################
    #    Report installation&#039;s result
    if [ $status -eq 0 ]; then
        echo &#039;MFP driver package has been installed successfully.&#039;
    else
        echo &#039;Installation failed&#039;
    fi
fi

    return $status
}

#/////////////////////////////////////////////////////////////////////////////////////
#//    Beginning of MFP setup program

######################################################################################
#    Check kernel version
KERNEL_VER=2.4
XWINDOWINSTALLED=`IsXWindowInstalled`
TMP_DIR=/var/tmp
if ! [ -d $TMP_DIR ]; then
    mkdir -p -m 777 $TMP_DIR
fi
status=1
osVer=`uname -r`
osVer1=`echo $osVer|awk -F &#039;.&#039; &#039;{print $1}&#039; -`
osVer2=`echo $osVer|awk -F &#039;.&#039; &#039;{print $2}&#039; -`
echo    $osVer1.$osVer2 &gt; $TMP_DIR/dummy1$$
echo    $KERNEL_VER &gt; $TMP_DIR/dummy2$$
verCmp=`compareVersions $TMP_DIR/dummy1$$ $TMP_DIR/dummy2$$`
if [ $verCmp -eq 2 ] || [ $verCmp -lt 0 ]; then
    echo Wrong Linux Kernel version. Kernel must be $KERNEL_VER or highter. Installation halted...
    
    exit 1
fi
#    Check kernel version
######################################################################################

# Copy x86_64 binaries into installation pool begin {
if [ -d x86_64 ]; then
    mkdir -p $MFP_INSTALL_DIR/x86_64/
    cp -a -f x86_64/* $MFP_INSTALL_DIR/x86_64/
else
    echo &#039;*** WARNING ! This distribution does NOT support AMD64 / EM64T systems ***&#039;
    sleep 3
fi
# Copy x86_64 binaries into installation pool end   }

######################################################################################
#    Prepare qt library

# Check if libstdc++ v3 (gcc 2.96) installed
if [ ! -h /usr/lib/libstdc++-libc6.2-2.so.3 -o ! -f /usr/lib/libstdc++-3-libc6.2-2-2.10.0.so ]; then
    echo -n &quot;libstdc++ v3 (gcc 2.96) not found, intstall ... &quot;
    zcat rd/libstdc++-3.tar.gz | tar -xf - -C /
    ldconfig
    echo &quot;done&quot;
fi

LD_LIBRARY_PATH=$PWD/rd:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH

#    Prepare qt library
######################################################################################

MODEL=
MODEL_DIRECTORY=
LANGUAGE=English
ACTION=Install
######################################################################################
#    Parse parameters
if [ $# -eq 4 ]; then
    MODEL=$1
    MODEL_DIRECTORY=$2
    LANGUAGE=$3
    ACTION=$4
fi
#    Parse parameters
######################################################################################

# Uncoment the next line to force text mode install
#XWINDOWINSTALLED=0

######################################################################################
#    Make sure CUPS is started if present

if ! ( ps -e | grep cupsd &gt;/dev/null 2&gt;/dev/null ) ; then
    `cupsd &gt;/dev/null 2&gt;/dev/null`
fi

#    Make sure CUPS is started if present
######################################################################################

status=0
if [ $XWINDOWINSTALLED -eq 1 ]; then
    ######################################################################################
    #    Install under XWin
    
    if [ &quot;$MODEL&quot; == &quot;&quot; ] ; then    #    First start - let&#039;s determine parameters
        echo &#039;Starting graphical installation part. Please, wait...&#039;
        ./autorun.gui &amp;
        exit 0
    else
        case $ACTION in
            install)
                #    Install driver
#                CUR_DIR=$PWD
#                cd &quot;./platforms/$LINUX_DISTR/scripts&quot;
##                sh setup.sh $XWINDOWINSTALLED ../../../models/$MODEL_DIRECTORY/$LINUX_DISTR $LANGUAGE
#                sh setup.sh $XWINDOWINSTALLED ../../../models/$MODEL_DIRECTORY $LANGUAGE
                do_setup ./models/$MODEL_DIRECTORY
                status=$?
#                cd &quot;$CUR_DIR&quot;;;
                ;;
            uninstall)
                #    Uninstall driver
                CUR_DIR=$PWD
###                cd &quot;./models/$MODEL_DIRECTORY/$LINUX_DISTR&quot;
#                cd &quot;./models/$MODEL_DIRECTORY&quot;
#                sh drivers.sh uninstall
                ./uninstall -p ./models/$MODEL_DIRECTORY -e ./drivers.sh -a uninstall
                status=$?
                cd &quot;$CUR_DIR&quot;;;
            *)
                echo &quot;Wrong action. You can either &#039;install&#039; or &#039;uninstall&#039; driver package.&quot;
                exit 1;;
        esac
    fi
else
    ######################################################################################
    #    No XWin - text installation

    ######################################################################################
    #    OK. Now determine what to install, or, may be, uninstall (model, directory, language, action).
    if [ &quot;$MODEL&quot; == &quot;&quot; ] ; then    #    First start - let&#039;s determine parameters

        #    Hey, User! Lets talk!

        ######################################################################################
        #    1. - MFP model &amp; directory
        transString=`cat $AUTORUN_INF_FILE | grep ModelName | awk -F &#039;=&#039; &#039;{print $2}&#039; - | tr &#039; &#039; &#039;~&#039;`
        echo
        i=0
        for translated in $transString; do
            i=`expr $i + 1`
        done
        if [ $i -eq 1 ]; then
            MODEL=`echo $translated | tr &#039;~&#039; &#039; &#039;`
            MODEL_DIRECTORY=`cat $AUTORUN_INF_FILE | grep DriversDir | awk -F &#039;=&#039; &#039;{print $2}&#039; -`
        else
            echo &#039;Please, select your device model...&#039;
            i=0
            for translated in $transString; do
                i=`expr $i + 1`
                name=`echo $translated | tr &#039;~&#039; &#039; &#039;`
                echo -e &#039;\t&#039; [$i] $name
            done
            iCancel=`expr $i + 1`
            echo -e &#039;\t&#039; [$iCancel] &#039;Cancel installation&#039;
            execMenu=1
            while [ $execMenu -eq 1 ]
            do
                read -p &#039;Please make your choice [1,2, ...]: &#039; -n 1 shallInstall
                result=`IsDigit $shallInstall`
                if [ $result -eq 1 ] ; then
                    if [ $shallInstall -ge 1 ] &amp;&amp; [ $shallInstall -le $i ]; then
                        execMenu=0
                        #    Get model &amp; dir names
                        j=0
                        for translated in $transString
                        do
                            j=`expr $j + 1`
                            if [ $j -eq $shallInstall ]; then
                                MODEL=`echo $translated | tr &#039;~&#039; &#039; &#039;`
                            fi
                        done
                        transDirs=`cat $AUTORUN_INF_FILE | grep DriversDir | awk -F &#039;=&#039; &#039;{print $2}&#039; - | tr &#039; &#039; &#039;~&#039;`
                        j=0
                        for translated in $transDirs
                        do
                            j=`expr $j + 1`
                            if [ $j -eq $shallInstall ]; then
                                MODEL_DIRECTORY=`echo $translated | tr &#039;~&#039; &#039; &#039;`
                            fi
                        done
                    fi
                    if [ $shallInstall -eq $iCancel ]; then
                        echo
                        exit 1
                    fi
                fi
                echo -e -n &#039;\r&#039;
            done
            echo
        fi

        ######################################################################################
        #    2. - Language - NO USE. DON&#039;T understand anything except english.
        LANGUAGE=English


        ######################################################################################
        #    3. - Action
        echo
        echo    &#039;What would you like to do?..&#039;
        echo -e &#039;\t[1] Install driver package&#039;
        echo -e &#039;\t[2] Uninstall driver package&#039;
        echo -e &#039;\t[3] Cancel installation&#039;
        execMenu=1
        while [ $execMenu -eq 1 ]
        do
            read -p &#039;Please make your choice [1,2,3]: &#039; -n 1 shallInstall
            case $shallInstall in
                1)    ACTION=install
                    execMenu=0;;
                2)    ACTION=uninstall
                    execMenu=0;;
                3)    status=1;
                    echo
                    exit $status;;
                *)    echo -e -n &#039;\r&#039;
            esac
        done
        echo
        
        #    Well. If we are still here - let&#039;s do something useful
        
        ######################################################################################
        #    Perform driver installation/uninstallation</code></pre></div></div></div>]]></content>
			<author>
				<name><![CDATA[Andrey271064]]></name>
				<uri>https://linuxforum.ru/profile.php?id=21984</uri>
			</author>
			<updated>2012-02-09T11:35:08Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=249602#p249602</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Посоветуйте с установкой МФУ xerox workcеntre pe 220]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=249594#p249594" />
			<content type="html"><![CDATA[<p>В архиве ищи файлики &quot;Readme&quot; или &quot;install&quot;, в них указанно как устанавливать. Или выложи их содержимое сюда.<br />А через МСС пробовал настраивать?</p>]]></content>
			<author>
				<name><![CDATA[Gnom]]></name>
				<uri>https://linuxforum.ru/profile.php?id=2577</uri>
			</author>
			<updated>2012-02-09T10:48:18Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=249594#p249594</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Посоветуйте с установкой МФУ xerox workcеntre pe 220]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=249579#p249579" />
			<content type="html"><![CDATA[<p>или может быть можно из консоли как-то установить программу с дровами, скачать из инета...но тогда с камими расширениями должен быть скачиваемый файл? oO</p>]]></content>
			<author>
				<name><![CDATA[Andrey271064]]></name>
				<uri>https://linuxforum.ru/profile.php?id=21984</uri>
			</author>
			<updated>2012-02-09T09:58:31Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=249579#p249579</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Посоветуйте с установкой МФУ xerox workcеntre pe 220]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=249530#p249530" />
			<content type="html"><![CDATA[<p>Всем здравия! Посоветуйте как установить в Мане 2011 мфушку xerox workcеntre pe 220. Скачал из нета прогу&nbsp; pe120_220_install.tar.gz , а что дальше делать не знаю. Или может это не то что надо. Очень был бы благодарен. В установках встает xerox workcеntre pe 120 и когда отправляю документ на печать принтер разогревается но дальше ничего не происходит</p>]]></content>
			<author>
				<name><![CDATA[Andrey271064]]></name>
				<uri>https://linuxforum.ru/profile.php?id=21984</uri>
			</author>
			<updated>2012-02-09T07:14:25Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=249530#p249530</id>
		</entry>
</feed>
