SHA256
1
0
forked from pool/uucp
uucp/uucp-1.07-grade.patch
Dr. Werner Fink def3280df7 Accepting request 402727 from home:scarabeus_iv
- Switch from uucp xinetd to systemd activated service
- Switch from suucp stunnel service to systemd service properly
  initing the stunnel

- Split out from sendmail package
- Cleanup to use proper deps and only depend on what's needed in which
  scriptlet
- Use %configure macro and friends
- Use just make_install and describe what is going in the install phase

OBS-URL: https://build.opensuse.org/request/show/402727
OBS-URL: https://build.opensuse.org/package/show/server:mail/uucp?expand=0&rev=4
2016-07-07 08:19:15 +00:00

92 lines
2.7 KiB
Diff

--- uucico.8
+++ uucico.8 Thu Jun 26 18:29:36 2003
@@ -145,6 +145,9 @@
.B \-f, \-\-force
Ignore any required wait for any systems to be called.
.TP 5
+.B \-g, \-\-grade
+Limit outgoing call to a given grade.
+.TP 5
.B \-l, \-\-prompt
Prompt for login name and password using "login: " and "Password:".
This allows
--- uucico.c
+++ uucico.c Thu Jun 26 18:29:58 2003
@@ -125,6 +125,9 @@
struct sconnection *qconn;
};
+/* min. grade set on commandline */
+static char cmdlgrade = '\0';
+
/* Local functions. */
static void uusage P((void));
@@ -175,6 +178,7 @@
{ "nodetach", no_argument, NULL, 'D' },
{ "loop", no_argument, NULL, 'e' },
{ "force", no_argument, NULL, 'f'},
+ { "grade", required_argument, NULL, 'g'},
{ "stdin", required_argument, NULL, 'i' },
{ "prompt", no_argument, NULL, 'l' },
{ "port", required_argument, NULL, 'p' },
@@ -249,9 +253,9 @@
++zProgram;
#if COHERENT_C_OPTION
- zopts = "c:CDefi:I:lp:qr:s:S:u:x:X:vwz";
+ zopts = "c:CDefg:i:I:lp:qr:s:S:u:x:X:vwz";
#else
- zopts = "cCDefi:I:lp:qr:s:S:u:x:X:vwz";
+ zopts = "cCDefg:i:I:lp:qr:s:S:u:x:X:vwz";
#endif
while ((iopt = getopt_long (argc, argv, zopts,
@@ -292,6 +296,14 @@
failed call. */
fforce = TRUE;
break;
+
+ case 'g':
+ /* Force a grade */
+ if (isalpha(optarg[0]))
+ cmdlgrade = optarg[0];
+ else
+ fprintf (stderr, "%s: invalid grade \n", zProgram);
+ break;
case 'i':
/* Type of port to use for standard input. Only TLI is
@@ -796,6 +808,7 @@
printf ("Usage: %s [options]\n", zProgram);
printf (" -s,-S,--system system: Call system (-S implies -f)\n");
printf (" -f,--force: Force call despite system status\n");
+ printf (" -g,--grade: Limit outgoing call to a given grade\n");
printf (" -r state: 1 for master, 0 for slave (default)\n");
printf (" --master: Act as master\n");
printf (" --slave: Act as slave (default)\n");
@@ -1369,12 +1382,18 @@
boolean fret;
/* Determine the grade we should request of the other system. A
- '\0' means that no restrictions have been made. */
- if (! ftimespan_match (qsys->uuconf_qcalltimegrade, &ival,
- (int *) NULL))
- bgrade = '\0';
+ '\0' means that no restrictions have been made.
+ If a grade is set on the command line, the calltimegrade-value
+ is overwritten. */
+
+ if (cmdlgrade != '\0')
+ bgrade = cmdlgrade;
else
- bgrade = (char) ival;
+ if (! ftimespan_match (qsys->uuconf_qcalltimegrade, &ival,
+ (int *) NULL))
+ bgrade = '\0';
+ else
+ bgrade = (char) ival;
/* Determine the name we will call ourselves. */
if (qsys->uuconf_zlocalname != NULL)