Document |
Printconf Write Module |
Author |
Jan Holesovsky, <kendy@suse.cz>, Petr Blahos <pblahos@suse.cz> |
Id |
$Id: write.html,v 1.1.1.1 2002/06/27 08:53:18 jsrain Exp $ |
Overview
princonf_write.ycp can work in two modes. If there is second argument it
means that test page is about to be printed. If there is only one
argument -- user_settings, it is going on final save.
Input
printconf_write.ycp takes following arguments:
- map user_settings -- described in
user_settings.txt
- integer index of queue to print test page to, optional
- string "ps"|"ascii" type of test page, optional
Process of saving
- back up files /etc/printcap /etc/gs.upp/* /etc/apsfilterrc*
- remove /etc/printcap (it will be re-created by apsfilter
- for each configured printer: if printer was already configured
- create file /etc/gs.upp/y2prn_<printer name>.upp (filter
settings may be here)
- add saved printcap entry for this printer to /etc/printcap
- for each configured printer: if printer is new remote printer
- create new apsfilter via /var/lib/apsfilter/apsfilter.setup -A -h
<hostname> -R <remote queue> -N <queue name> This also
creates default /etc/apsfilterrc.<upp name> file
- for each configured printer: if printer is new and is not remote printer
- create new upp file
- create new apsfilter via /var/lib/apsfilter/apsfilter.setup -A
<baud rate> -d <device> -upp <y2prn_queue name.upp> -N <queue name>
- for each printer printcap entry for the printer is saved to
/etc/gs.upp/y2prn_<queue name>.yast2
- for each printer that is configured by yast2 or at least apsfilter, change
apsfilterrc:
- for Epson USB printers, add init string to RESET_BEFORE (see Epson USB
printers)
- save options to apsfilterrc
- for Samba and NCP write REMOTE_PRINTER entry to apsfilterrc
Settings are saved now. For testpage printing:
- restart lpd, because it must re-read /etc/printcap
- print test page (described in
spec_testpage.html)
- restore backed-up settings
- restart lpd again
If no testpage is going to be printed, additional settings are saved:
- newly autodetected printers are saved to .var.lib.yast.unique
- parallel ports settings are saved to /etc/modules.conf
- save default printer and start lpd to rc.config
- run /bin/SuSEconfig to update profiles
- restart lpd
- remove backed up files
Parallel ports settings
By default, SuSE linux installs parport_pc io=0x378 irq=none,none into
/etc/modules.conf. Io ports can be changed in bios on some machines.
libhd can read these settings from bios and reload parport_pc module
with there settings. This happens when Read(.probe.byclass.comm.par) is
called. So printconf reads .probe.byclass.comm.par in the beggining to
have correct parport settings. When saving configuration, settings of parports
are saved to /etc/modules.conf. But there can be more parports that
that configured in bios. Hence if there are settings for more parports in
/etc/modules.conf then detected parports, additional parports settings
are not overwritten.