diff --git a/.downloads/ncpfs-0.15.tgz b/.downloads/ncpfs-0.15.tgz new file mode 100644 index 0000000..e7b4d9b Binary files /dev/null and b/.downloads/ncpfs-0.15.tgz differ diff --git a/Changes b/Changes index 035ba36..7e1f2b4 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,12 @@ I only began this file with ncpfs-0.12. If you're interested in older versions, you can find them on linux01.gwdg.de:/pub/ncpfs/old. +ncpfs-0.14 -> ncpfs-0.15 + +- A bug fixed that made normal mounting impossible. It was too late + yesterday. Sorry +- Manpage for pserver.c + ncpfs-0.13 -> ncpfs-0.14 - Improvements of manual pages by B. Galliart and diff --git a/man/pserver.1 b/man/pserver.1 new file mode 100644 index 0000000..de39c7b --- /dev/null +++ b/man/pserver.1 @@ -0,0 +1,142 @@ +.TH PSERVER 1 02/10/1996 pserver pserver +.SH NAME +pserver \- NetWare print server +.SH SYNOPSIS +.B pserver +[ +.B -S +.I server +] [ +.B -h +] [ +.B -U +.I user name +] [ +.B -P +.I password + | +.B -n +] [ +.B -C +] [ +.B -q +.I queue name +] [ +.B -c +.I command +] [ +.B -j +.I job type +] [ +.B -t +.I timeout +] [ +.B -d +] + +.SH DESCRIPTION +.B pserver +is a program that connects to print queues on NetWare servers and +feeds incoming print jobs to the Linux printing system. + +.SH OPTIONS +.B -h +.RS 3 +.B -h +is used to print out a short help text. +.RE + +.B -S +.I server +.RS 3 +.B server +is the name of the server you want to use. +.RE + +.B -U +.I user +.RS 3 +.B user +is the print server name at the server. +.RE + +.B -P +.I password +.RS 3 +.B password +is the password to use for the print server at the server. If neither +.B -n +nor +.B -P +are given, and the user has no open connection to the server, pserver +prompts for a password. +.RE + +.B -n +.RS 3 +.B -n +should be given if the print server does not require a password. +.RE + +.B -C +.RS 3 +By default, passwords are converted to uppercase before they are sent +to the server, because most servers require this. You can turn off +this conversion by +.B -C. +.RE + +.B -q +.I queue name +.RS 3 +.B queue name +is the name of the print queue you want to service. +.RE + +.B -c +.I command +.RS 3 +When a job is received from the print queue, pserver forks off a new +process, and feeds the job file to stdin. +.I command +is the printing command that is executed for each job. The default +command is 'lpr'. +.RE + +.B -j +.I job type +.RS 3 +Each job in a NetWare print queue has a job type. For print jobs, this +corresponds to the number of the form the job should be printed +on. You can tell pserver that it should only receive jobs for one +specific form from the queue. The default is -1, which means that +everything is received. +.RE + +.B -t +.I timeout +.RS 3 +Pserver is not informed by NetWare servers when new jobs arrive. So a +polling scheme has to be used. When there are no jobs to service, +.I timeout +tells pserver how long to wait between two requests. The default is 30 +seconds. When a job is finished, pserver asks the NetWare server +immediately for a new job, and does not wait +.I timeout +seconds. +.RE + +.B -d +.RS 3 +Normally, pserver daemonizes itself. +.B -d +tells it not to do so. This is useful if you want to see the +diagnostic messages that are printed when a error occurs. +.RE + + +.SH SEE ALSO +.B nwclient(5), slist(1), pqlist(1), ncpmount(8), ncpumount(8) + +.SH CREDITS +pserver was written by Volker Lendecke (lendecke@namu01.gwdg.de) diff --git a/ncpfs-0.14.lsm b/ncpfs-0.15.lsm similarity index 79% rename from ncpfs-0.14.lsm rename to ncpfs-0.15.lsm index b0fd580..8468d36 100644 --- a/ncpfs-0.14.lsm +++ b/ncpfs-0.15.lsm @@ -1,7 +1,7 @@ Begin3 Title: ncpfs -Version: 0.14 -Entered-date: 09. February 1996 +Version: 0.15 +Entered-date: 10. February 1996 Description: With ncpfs you can mount volumes of your novell server under Linux. You need kernel 1.2.x or 1.3.54 and above. ncpfs does NOT work with any 1.3.x @@ -11,7 +11,7 @@ Author: lendecke@namu01.gwdg.de (Volker Lendecke) Maintained-by: lendecke@namu01.gwdg.de (Volker Lendecke) Primary-site: linux01.gwdg.de:/pub/ncpfs Alternate-site: sunsite.unc.edu:/pub/system/Filesystems/ - ~70k ncpfs-0.14.tgz - ~ 1k ncpfs-0.14.lsm + ~70k ncpfs-0.15.tgz + ~ 1k ncpfs-0.15.lsm Copying-policy: GPL End diff --git a/util/Makefile b/util/Makefile index a831295..cbedae8 100644 --- a/util/Makefile +++ b/util/Makefile @@ -6,7 +6,7 @@ UTIL_EXECS = ncpmount ncpumount nprint slist pqlist fsinfo pserver UTILS = $(addprefix $(INTERM_BINDIR)/,$(UTIL_EXECS)) UIDUTILS = ncpmount ncpumount -# CFLAGS = -Wall $(INCLUDES) -O2 $(KERNELD) +#CFLAGS = -Wall $(INCLUDES) $(KERNELD) -g CFLAGS = -Wall $(INCLUDES) $(KERNELD) -O2 CC = gcc diff --git a/util/ncplib.c b/util/ncplib.c index ba6ed08..0d72c73 100644 --- a/util/ncplib.c +++ b/util/ncplib.c @@ -1201,6 +1201,7 @@ ncp_find_conn_spec(const char *server, const char *user, const char *password, str_upper(spec.server); str_upper(spec.user); + spec.login_type = NCP_BINDERY_USER; if (ncp_open_permanent(&conn, &spec) == 0) { diff --git a/util/ncpmount.c b/util/ncpmount.c index 5e1c9cb..a791945 100644 --- a/util/ncpmount.c +++ b/util/ncpmount.c @@ -330,7 +330,7 @@ main(int argc, char *argv[]) exit(1); } -#ifndef HAVE_KERNEL +#ifndef HAVE_KERNELD /* Check if the ncpfs filesystem is in the kernel. If not, attempt * to load the ncpfs module */ if (load_ncpfs() != 0) diff --git a/util/nprint.c b/util/nprint.c index a3f20c3..f2e41c7 100644 --- a/util/nprint.c +++ b/util/nprint.c @@ -316,7 +316,7 @@ static void help(void) { printf("\n"); - printf("usage: %s [options] mount-point\n", progname); + printf("usage: %s [options] file\n", progname); printf("\n" "-S server Server name to be used\n" "-U username Username sent to server\n" diff --git a/util/pserver.c b/util/pserver.c index c7ac77c..f19b5ad 100644 --- a/util/pserver.c +++ b/util/pserver.c @@ -29,6 +29,7 @@ struct nw_queue { static struct nw_queue q; static int term_request; +static char *progname; static int init_queue(struct ncp_conn *conn, char *queue_name, @@ -37,11 +38,31 @@ init_queue(struct ncp_conn *conn, char *queue_name, static int poll_queue(struct nw_queue *q); -void +static void usage(void) { - /* Obviously, there's more to do */ - return; + fprintf(stderr, "usage: %s [options] file\n", progname); + exit(1); +} + +static void +help(void) +{ + printf("\n"); + printf("usage: %s [options]\n", progname); + printf("\n" + "-S server Server name to be used\n" + "-U username Print Server name sent to server\n" + "-P password Use this password\n" + "-n Do not use any password\n" + "-C Don't convert password to uppercase\n" + "-q queue name Name of the printing queue to use\n" + "-c command Name of print command, default: 'lpr'\n" + "-j job type Type of job (Form number) to service\n" + "-t timeout Polling interval, default: 30 sec\n" + "-d Debug: don't daemonize\n" + "-h print this help text\n" + "\n"); } #ifndef NCP_BINDERY_PSERVER @@ -52,10 +73,10 @@ static void terminate_handler() { signal(SIGTERM,terminate_handler); + signal(SIGINT, terminate_handler); term_request=1; } -#if 0 static void daemonize() { @@ -77,7 +98,6 @@ daemonize() close(fd); } } -#endif int main(int argc, char *argv[]) @@ -87,19 +107,46 @@ main(int argc, char *argv[]) int opt; int job_type = 0xffff; int debug = 0; + int i; char *queue_name = NULL; char default_command[] = "lpr"; char *command = default_command; + progname = argv[0]; + + for (i = 1; i < argc; i += 1) + { + if ( (strcmp(argv[i], "-h") == 0) + || (strcmp(argv[i], "-?") == 0)) + { + help(); + exit(0); + } + } + + for (i = 1; i < argc; i += 1) + { + if (strcmp(argv[i], "-d") == 0) + { + debug = 1; + break; + } + } + + if (debug == 0) + { + daemonize(); + } + if (ncp_initialize_as(&conn, &argc, argv, 1, NCP_BINDERY_PSERVER) != 0) { perror("Could not open connection"); return 1; } - while ((opt = getopt(argc, argv, "q:c:j:t:d")) != EOF) + while ((opt = getopt(argc, argv, "q:c:j:t:dh")) != EOF) { switch (opt) { @@ -118,18 +165,26 @@ main(int argc, char *argv[]) case 'd': debug = 1; break; + case 'h': + break; default: usage(); return -1; } } + if (argc != optind) + { + usage(); + return -1; + } + memzero(q); - if (debug == 0) + if (queue_name == NULL) { - /* We can not daemonize after ncp_initialize, sorry */ - /* daemonize(); */ + fprintf(stderr, "You must specify a queue\n"); + return 1; } if (init_queue(&conn, queue_name, command, &q) != 0) @@ -143,6 +198,7 @@ main(int argc, char *argv[]) term_request = 0; signal(SIGTERM,terminate_handler); + signal(SIGINT, terminate_handler); while (1) {