Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b8ce93c8bd |
BIN
.downloads/ncpfs-0.15.tgz
Normal file
BIN
.downloads/ncpfs-0.15.tgz
Normal file
Binary file not shown.
6
Changes
6
Changes
@@ -1,6 +1,12 @@
|
|||||||
I only began this file with ncpfs-0.12. If you're interested in older
|
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.
|
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
|
ncpfs-0.13 -> ncpfs-0.14
|
||||||
|
|
||||||
- Improvements of manual pages by B. Galliart <bgallia@luc.edu> and
|
- Improvements of manual pages by B. Galliart <bgallia@luc.edu> and
|
||||||
|
|||||||
142
man/pserver.1
Normal file
142
man/pserver.1
Normal file
@@ -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)
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
Begin3
|
Begin3
|
||||||
Title: ncpfs
|
Title: ncpfs
|
||||||
Version: 0.14
|
Version: 0.15
|
||||||
Entered-date: 09. February 1996
|
Entered-date: 10. February 1996
|
||||||
Description: With ncpfs you can mount volumes of your novell
|
Description: With ncpfs you can mount volumes of your novell
|
||||||
server under Linux. You need kernel 1.2.x or
|
server under Linux. You need kernel 1.2.x or
|
||||||
1.3.54 and above. ncpfs does NOT work with any 1.3.x
|
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)
|
Maintained-by: lendecke@namu01.gwdg.de (Volker Lendecke)
|
||||||
Primary-site: linux01.gwdg.de:/pub/ncpfs
|
Primary-site: linux01.gwdg.de:/pub/ncpfs
|
||||||
Alternate-site: sunsite.unc.edu:/pub/system/Filesystems/
|
Alternate-site: sunsite.unc.edu:/pub/system/Filesystems/
|
||||||
~70k ncpfs-0.14.tgz
|
~70k ncpfs-0.15.tgz
|
||||||
~ 1k ncpfs-0.14.lsm
|
~ 1k ncpfs-0.15.lsm
|
||||||
Copying-policy: GPL
|
Copying-policy: GPL
|
||||||
End
|
End
|
||||||
@@ -6,7 +6,7 @@ UTIL_EXECS = ncpmount ncpumount nprint slist pqlist fsinfo pserver
|
|||||||
UTILS = $(addprefix $(INTERM_BINDIR)/,$(UTIL_EXECS))
|
UTILS = $(addprefix $(INTERM_BINDIR)/,$(UTIL_EXECS))
|
||||||
UIDUTILS = ncpmount ncpumount
|
UIDUTILS = ncpmount ncpumount
|
||||||
|
|
||||||
# CFLAGS = -Wall $(INCLUDES) -O2 $(KERNELD)
|
#CFLAGS = -Wall $(INCLUDES) $(KERNELD) -g
|
||||||
CFLAGS = -Wall $(INCLUDES) $(KERNELD) -O2
|
CFLAGS = -Wall $(INCLUDES) $(KERNELD) -O2
|
||||||
CC = gcc
|
CC = gcc
|
||||||
|
|
||||||
|
|||||||
@@ -1201,6 +1201,7 @@ ncp_find_conn_spec(const char *server, const char *user, const char *password,
|
|||||||
|
|
||||||
str_upper(spec.server);
|
str_upper(spec.server);
|
||||||
str_upper(spec.user);
|
str_upper(spec.user);
|
||||||
|
spec.login_type = NCP_BINDERY_USER;
|
||||||
|
|
||||||
if (ncp_open_permanent(&conn, &spec) == 0)
|
if (ncp_open_permanent(&conn, &spec) == 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -330,7 +330,7 @@ main(int argc, char *argv[])
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef HAVE_KERNEL
|
#ifndef HAVE_KERNELD
|
||||||
/* Check if the ncpfs filesystem is in the kernel. If not, attempt
|
/* Check if the ncpfs filesystem is in the kernel. If not, attempt
|
||||||
* to load the ncpfs module */
|
* to load the ncpfs module */
|
||||||
if (load_ncpfs() != 0)
|
if (load_ncpfs() != 0)
|
||||||
|
|||||||
@@ -316,7 +316,7 @@ static void
|
|||||||
help(void)
|
help(void)
|
||||||
{
|
{
|
||||||
printf("\n");
|
printf("\n");
|
||||||
printf("usage: %s [options] mount-point\n", progname);
|
printf("usage: %s [options] file\n", progname);
|
||||||
printf("\n"
|
printf("\n"
|
||||||
"-S server Server name to be used\n"
|
"-S server Server name to be used\n"
|
||||||
"-U username Username sent to server\n"
|
"-U username Username sent to server\n"
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ struct nw_queue {
|
|||||||
static struct nw_queue q;
|
static struct nw_queue q;
|
||||||
|
|
||||||
static int term_request;
|
static int term_request;
|
||||||
|
static char *progname;
|
||||||
|
|
||||||
static int
|
static int
|
||||||
init_queue(struct ncp_conn *conn, char *queue_name,
|
init_queue(struct ncp_conn *conn, char *queue_name,
|
||||||
@@ -37,11 +38,31 @@ init_queue(struct ncp_conn *conn, char *queue_name,
|
|||||||
static int
|
static int
|
||||||
poll_queue(struct nw_queue *q);
|
poll_queue(struct nw_queue *q);
|
||||||
|
|
||||||
void
|
static void
|
||||||
usage(void)
|
usage(void)
|
||||||
{
|
{
|
||||||
/* Obviously, there's more to do */
|
fprintf(stderr, "usage: %s [options] file\n", progname);
|
||||||
return;
|
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
|
#ifndef NCP_BINDERY_PSERVER
|
||||||
@@ -52,10 +73,10 @@ static void
|
|||||||
terminate_handler()
|
terminate_handler()
|
||||||
{
|
{
|
||||||
signal(SIGTERM,terminate_handler);
|
signal(SIGTERM,terminate_handler);
|
||||||
|
signal(SIGINT, terminate_handler);
|
||||||
term_request=1;
|
term_request=1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
static void
|
static void
|
||||||
daemonize()
|
daemonize()
|
||||||
{
|
{
|
||||||
@@ -77,7 +98,6 @@ daemonize()
|
|||||||
close(fd);
|
close(fd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
int
|
int
|
||||||
main(int argc, char *argv[])
|
main(int argc, char *argv[])
|
||||||
@@ -87,19 +107,46 @@ main(int argc, char *argv[])
|
|||||||
int opt;
|
int opt;
|
||||||
int job_type = 0xffff;
|
int job_type = 0xffff;
|
||||||
int debug = 0;
|
int debug = 0;
|
||||||
|
int i;
|
||||||
|
|
||||||
char *queue_name = NULL;
|
char *queue_name = NULL;
|
||||||
|
|
||||||
char default_command[] = "lpr";
|
char default_command[] = "lpr";
|
||||||
char *command = default_command;
|
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)
|
if (ncp_initialize_as(&conn, &argc, argv, 1, NCP_BINDERY_PSERVER) != 0)
|
||||||
{
|
{
|
||||||
perror("Could not open connection");
|
perror("Could not open connection");
|
||||||
return 1;
|
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)
|
switch (opt)
|
||||||
{
|
{
|
||||||
@@ -118,18 +165,26 @@ main(int argc, char *argv[])
|
|||||||
case 'd':
|
case 'd':
|
||||||
debug = 1;
|
debug = 1;
|
||||||
break;
|
break;
|
||||||
|
case 'h':
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
usage();
|
usage();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (argc != optind)
|
||||||
|
{
|
||||||
|
usage();
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
memzero(q);
|
memzero(q);
|
||||||
|
|
||||||
if (debug == 0)
|
if (queue_name == NULL)
|
||||||
{
|
{
|
||||||
/* We can not daemonize after ncp_initialize, sorry */
|
fprintf(stderr, "You must specify a queue\n");
|
||||||
/* daemonize(); */
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (init_queue(&conn, queue_name, command, &q) != 0)
|
if (init_queue(&conn, queue_name, command, &q) != 0)
|
||||||
@@ -143,6 +198,7 @@ main(int argc, char *argv[])
|
|||||||
|
|
||||||
term_request = 0;
|
term_request = 0;
|
||||||
signal(SIGTERM,terminate_handler);
|
signal(SIGTERM,terminate_handler);
|
||||||
|
signal(SIGINT, terminate_handler);
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user