Next Previous Contents

2. Erwthseis & Apanthseis

2.1 Ti einai enas diaxeirisths faj/ektypwths ;

Enas diaxeirhsths faj/ektypwths einai oysiastika mia egkatastash merikwn programmatwn: hlektroniko faj, kai o diaxeirisths ektypwsewn, me tetoio tropo wste h apostolh faj apo ena hlektroniko ypologisth einai toso aplh oso kai h apostolh mias ektupwtikhs ergasias se enan ektypwth.

2.2 Pws na to egkatasthsete ;

H egkatastash enos hlektronikou faj san diaxeiristh faj/ektypwth emperiexei merika problhmata Ustera apo arketes prospa8eies, apofasisa na mazecw ayth thn sofeia mesa se ena mikro-HOWTO. Ka8e eidoys sxolia ginontai dekta sthn dieu8ynsh <erez@newplaces.com>. Perigrafw edw, ta parapanw problhmata ka8ws kai oles tis odhgies stadiaka:

To logismiko hlektronikou faj

bebaiw8eite oti exete sthn katoxh sas to paketo toy hlektronikou faj.

Se susthma me yposthrijh RPM xrhsimopoihste thn entolh 'rpm -qv efax'.

Mporeite na parete ton phgaio kwdika toy hlektronikou faj se tar.gz format apo to sunsite: ftp://sunsite.unc.edu/pub/Linux/apps/serialcomm/fax/efax08a.tar.gz h to rpm me ta ektelesima : ftp://ftp.redhat.com/pub/redhat/redhat-4.2/i386/RedHat/RPMS/efax-0.8a-3.i386.rpm

H kataxwrhsh sto printcap.

H tekmhriwsh toy hlektronikou faj den exei to : sto telos ths kataxwrhshs sto printcap.

Lush: Pros8este thn akoloy8h kataxwrhsh /etc/printcap :

fax:\
        :lp=/dev/null:\
        :sd=/var/spool/fax:\
        :if=/usr/bin/faxlpr:

H entolh faj (fax)

Xrhshmopoihste hard link kai oxi symbolikh sundesh (soft link) sthn entolh faj.

Trejte thn entolh:

ln /usr/bin/fax /usr/bin/faxlpr

To arxeio /usr/bin/fax.

Kataxwrhste to /usr/bin/fax stis protimhseis:

Dialexte thn katalhllh Fax Class gia to montem:

CLASS=2.0
8este to FROM="your international phone number" pedio
NAME="Your Name"
Pros8este thn grammh gia metatroph toy die8nous thlefwnikou ari8mou se topiko gia paradeigma sto Israhl 8a xrhsimopoiousate:
TELCVT='sed -e s/+972/0/ -e s/+/00/'  # Israel

Yparxei ena problhma sto arxeio sthn grammh 586, allajte to cfile=... me tis akoloy8es duo grammes:

cfile=`/usr/bin/tail -1 lock`
cfile=`cat $cfile`

stis grammes 586,587 den 8a eprepe na yparxoyn '-' sumbola,oi grammes einai:

0) echo "$l" | mail -s "fax to $num succeeded" $user@$host ;;
*) echo "$l" | mail -s "fax to $num failed   " $user@$host ;;

O katalogos /var/spool/fax.

Dhmioyrghste ton katalogo /var/spool/fax

mkdir /var/spool/fax
chmod 777 /var/spool/fax

To arxeio kleidwmatos (lock file).

To arxeio kleidwmatos (/var/spool/fax/lock) exei dhmioyrgh8ei me lan8asmenes adeies, xrhsimopoihste thn akoloy8h entolh gia na to 8esete swsta:

touch /var/spool/fax/lock ; chmod 644 /var/spool/fax/lock

To eidiko arxeio /dev/modem.

To programma hlektronikou faj perimenei ena arxeio pragmatikhs (real device file) sto /dev/modem kai den prokeitai na doylecei me symboliko link, kai etsi dhmioyrgoume ena arxeio syskeyhs me ton idio megisto (major) kai elaxisto (minor) ari8mo, ka8ws to /dev/cua? einai syndedemeno me to montem. To arxeio 8a prepei na exei mode to rw-rw-rw- wste na epitrepei se ka8e xrhsth na xrhsimopoiei to logismiko faj.

ls -lL /dev/modem 
rm /dev/modem
mknod /dev/modem c Mj Mi
chmod 666 /dev/modem

To Mj einai 5, kai to Mi einai 64 gia to cua0, 65 gia to cua1 k.l.p. Gia paradeigma (gia to cua1):

mknod /dev/modem c 5 65

O katalogos /var/lock.

Allaje to mode ston katalogo /var/lock

chmod 1777 /var/lock

2.3 Pws to xrhsimopoiw, gia ton server;

8a eprepe na xrhsimopoieite ton faj/ektypwth xrhsimopoiwntas thn epilogh -P kai thn epilogh -J me ton ari8mo toy faj.

xrhsimopoihste mia apo tis akoloy8es entoles lpr:

 lpr -Pfax -J <Fax-Number> [file-names]
 any command | lpr -Pfax -J <Fax-Number>

2.4 Pou mporw na prosdiorisw ton ari8mo faj toy paralhpth?

Meta apo thn epilogh -J.

2.5 Pws to xrhsimopoiw apo alla Unixes toy diktuoy ?

Pros8es8e thn akoloy8h kataxwrhsh mesa sto arxeio /etc/printcap kai ta client Linux systhmata, dhmioyrghste to spool directory, kai synexiste analoga ...

fax:\
        :sd=/var/spool/fax:\
        :mx#0:\
        :sh:\
        :rm=host.domain:\
        :rp=fax:

pros8este to onoma twn client hosts sto /etc/hosts.lpd ths mhxanhs me poy dra ws diaxeirisths faj.

xrhsimopoihste to opws prohgoymenws.

Shmeiwsh:

H epikefalida thn opoia pros8etei to hlektroniko faj stis selides toy faj den allazei me bash to onoma toy xrhsth o opoios stelnei to faj. (mporei na enhmerw8ei).

2.6 Caldera, Gia xrhstes toy LPRng

To logismiko diaxeirishs ektypwsewn LPRng xrhsimopoiei mia diaforetikh me8odo gia na elegxei ton arxeio elegxoy.

Eyxaristies ston Luca Montecchiani <m.luca@usa.net>, o opoios brhke to problhma alla kai thn lush. Edw einai mia enhmerwsh tou arxeioy /usr/bin/fax. H akoloy8h grammh antika8ista tis duo aples grammes toy tupoy cfile=...>, stis grammes 586,587

# Modified to work also with the LPRng package
# Luca Montecchiani (08/11/97 m.luca@usa.net)
if [ !-z "$CONTROL_FILE" ]
    then
        cfile=`cat tail -1 lock`
        cfile=`cat $cfile`
    else
        cfile=$CONTROL_FILE
fi                                       


Next Previous Contents