Commit Graph

44 Commits

Author SHA1 Message Date
Sheldon Hearn
ef8f7ac935 Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.
2000-03-01 11:27:47 +00:00
Peter Wemm
7f3dea244c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
Kris Kennaway
a05dbf91e4 sprintf -> snprintf
Obtained from:	OpenBSD
1999-06-06 07:18:49 +00:00
Kris Kennaway
fe9ea368e1 $Header$ -> $Id$
Manpage formatting/grammatical fixes.
Check return value of malloc()
Add sccsid[], other minor source code cleanups

Submitted by:	Philippe Charnier
1999-05-29 08:16:34 +00:00
Bruce Evans
ab84534772 Fixed printf format errors. 1998-08-02 16:06:35 +00:00
Bruce Evans
836b4a7ff9 Fixed printf format errors. 1998-06-28 20:33:36 +00:00
John Birrell
d371a23e0b Remove the casts on signal() returns and compare the returned value
with SIG_ERR to detect the error case.

Suggested by: bde.
1998-02-20 07:28:50 +00:00
John Birrell
155ad7517d signal() returns an pointer, so must be cast to long, not int before
comparing < 0.
1998-01-25 09:16:55 +00:00
Eivind Eklund
3690cf7295 Remove unused private include files from slattach.
Submitted by:	bde
1997-12-21 13:42:27 +00:00
Philippe Charnier
ac9df8c8e7 Use err(3). Add usage(). 1997-06-19 14:33:42 +00:00
Daniel O'Callaghan
12d247a783 Fix typo: "oder" -> "order". 1997-04-16 09:56:30 +00:00
Brian Somers
687d0cdeb3 Remove the syslog stuff, and allow various return values
in uu_lock().  Add uu_lockerr() for turning the results of
uu_lock into something printable.  Remove bogus section in man page
about race conditions allowing both processes to get the lock.
Include libutil.h and use uu_lock() correctly  where it should.

Suggested by:	ache@freebsd.org
1997-03-31 22:51:00 +00:00
Brian Somers
568b59b9df Move uucplock into libutil and create a manual page. 1997-03-30 12:12:20 +00:00
Warner Losh
8d64695c7c compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-29 03:33:12 +00:00
Peter Wemm
c0ec1f37ef Revert $FreeBSD$ to $Id$ 1997-02-22 14:40:44 +00:00
Jordan K. Hubbard
1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Wolfram Schneider
af20215665 Sort cross references. 1997-01-13 00:25:51 +00:00
Garrett Wollman
702a1d0148 Update to match changes in <net/if.h>. 1997-01-03 20:19:50 +00:00
Garrett Wollman
2600973097 Fix if.h lossage. I could have sworn I already fixed this one. 1996-12-10 21:25:42 +00:00
Garrett Wollman
628d2ac1b0 Fix up programs which expect <net/if.h> to include <sys/time.h> to instead
do it themselves.  (Some of these programs actually depended on this
beyond compiling the definition of struct ifinfo!)  Also fix up some
other #include messes while we're at it.
1996-12-10 17:11:53 +00:00
Andrey A. Chernov
da1842c866 Properly distinguish 3 different cases:
No redial command. Empty redial command. Non-empty redial command.
Pointed-by: bde
1996-03-12 23:14:45 +00:00
Andrey A. Chernov
698b8864c5 Re-open line after hangup in any case 1996-03-12 12:56:27 +00:00
Andrey A. Chernov
438a2cf9d4 Call unit-command -1 <new> first time connected, close PR 569 1996-02-17 19:21:41 +00:00
Mike Pritchard
e71057d8d0 Fix a bunch of spelling errors. 1996-01-29 23:52:43 +00:00
Peter Wemm
a5b996a7ec recording cvs-1.6 file death 1995-12-30 19:02:48 +00:00
Nate Williams
90b430e870 Convert to proper English in the same manner as the sliplogin manpage. 1995-10-26 05:13:54 +00:00
Joerg Wunsch
a67ac8c6f2 Call the -u UCMD command on exit. The command is called with the
current unit number, and the "new" unit number of -1.  This allows the
script to actually deconfigure the SLIP interface (e.g. by running
"ifconfig delete") which has been impossible previously.

This is most likely a candidate for 2.1, too.
1995-09-29 22:03:13 +00:00
Andrey A. Chernov
89ba97703c From Bruce:
slattach always exited early because fd is not open in acquire_line().

Other (trivial) changes that I've been neglecting for some time:

- Turn off O_NONBLOCK so that `chat' doesn't need to worry about it
  (`chat' actually does worry about it).
- Really set speeds POSIXly :-).  cfsetspeed() isn't POSIX.
- Fix spelling error in comment.
- Gripe about bad programming of doing everything from signal handlers.
  slattach should be written to do everything from the sigsuspend() loop,
  but I don't want to do it :-).

From me:
Use .PATH to find uucplock.c

Submitted by: bde
1995-09-20 12:56:25 +00:00
Andrey A. Chernov
1ff1e51f2d Make uucp-locking optional: -L option 1995-09-20 04:53:08 +00:00
Andrey A. Chernov
7fcd7f5dcb Unlock device for redial_cmd, then lock again 1995-09-19 09:07:51 +00:00
Andrey A. Chernov
5ab506f0f1 Implement uucp-locking
Cleanup debug/syslog code
1995-09-19 03:27:31 +00:00
Andrey A. Chernov
f24b54a614 Change new -U option to -S to go the same way as startslip. 1995-09-18 14:06:38 +00:00
Andrey A. Chernov
2da5bee280 New options:
-K #: set SLIP keepalive timeout
-O #: set SLIP outfil timeout
-U #: set SLIP unit number
sighup handler now sets tty disc for non-redial case too.
Implement SIGURG handling (from keepalive).
POSIXing speed settings.
1995-09-18 13:33:30 +00:00
Rodney W. Grimes
5ebc7e6281 Remove trailing whitespace. 1995-05-30 06:12:45 +00:00
Joerg Wunsch
18c0c440eb Do not try to make any notice if the PID file cannot be created.
Makes folks happy that run slattach in single-user, where /var/run is
probably missing.
1995-03-12 23:37:28 +00:00
Joerg Wunsch
21bfcc9f8c Make slattach create a PID file under /var/run when the connection is
established.  This way, automatic scripts are possible that might
control the SLIP connection.  It's unacceptable for a daemon that's
being controlled by a variety of signals to not leave its PID
somewhere.  The file name contains the terminal path name component of
the associated tty device, so it should be unique even with multiple
parallel slattach's running.  The file will be unlinked at regular exit.

Also found a minor bug in the option handling by compiling with -Wall.
1995-03-12 15:04:18 +00:00
Andrey A. Chernov
7fe4e56742 configure_network() if carrier already present
Submitted by: serg@opus.opu.odessa.ua
1995-02-25 18:06:23 +00:00
Andrey A. Chernov
ea69190efb Check exit code of the dialer, from asa@gw.cronyx.msk.su
Set HUPCL as default modem flag, idea from asa@gw.cronyx.msk.su
but different implementation.
1994-11-14 20:17:36 +00:00
Andrey A. Chernov
c981965073 Remove extra :%s from syslog formats 1994-11-01 08:34:32 +00:00
David Greenman
a68dd6cb87 Fixed slattach to do flags ioctl via network device rather than tty.
Submitted by:	Rich Murphey, and fixed up by me.
1994-09-14 05:40:56 +00:00
Rich Murphey
97605525f5 Once again, slattach sources ported from 1.1.5 with fixes.
Reviewed by:	davidg, bde
Submitted by:	rich
1994-08-23 08:28:32 +00:00
Rich Murphey
76a4cb22c6 Slattach ported from 1.1.5 plus Bruce Evans suggested fix (close
FDs and fork before redialing) to prevent dialer from hanging with
newer sio.c.

Also moved history from the source to the cvs log (here) per
David G's suggestion.

This compiles but needs testing now...  Rich

/*
 * Hacks to support "-a|c|n" flags on the command line which enable VJ
 * header compresion and disable ICMP.
 * If this is good all rights go to B & L Jolitz, otherwise send your
 * comments to Reagan (/dev/null).
 *
 * nerd@percival.rain.com (Michael Galassi) 92.09.03
 *
 * Hacked to change from sgtty to POSIX termio style serial line control
 * and added flag to enable cts/rts style flow control.
 *
 * blymn@awadi.com.au (Brett Lymn) 93.04.04
 *
 * Put slattach in it's own process group so it can't be killed
 * accidentally. Close the connection on SIGHUP and SIGINT. Write a
 * syslog entry upon opening and closing the connection.  Rich Murphey
 * and Brad Huntting.
 *
 * Add '-r command' option: runs 'command' upon recieving SIGHUP
 * resulting from loss of carrier.  Log any errors after forking.
 * Rich 8/13/93
 *
 * This version of slattach includes many changes by David Greenman, Brian
 * Smith, Chris Bradley, and me (Michael Galassi).  None of them are
 * represented as functional anywhere outside of RAINet though they do work
 * for us.  Documentation is limited to the usage message for now.  If you
 * make improovments please pass them back.
 *
 * Added '-u UCMD' which runs 'UCMD <old> <new>' whenever the slip
 * unit number changes where <old> and <new> are the old and new unit
 * numbers, respectively.  Also added the '-z' option which forces
 * invocation of the redial command (-r CMD) upon startup regardless
 * of whether the com driver claims (sometimes mistakenly) that
 * carrier is present. Also added '-e ECMD' which runs ECMD before
 * exiting.
 *
 * marc@escargot.rain.com (Marc Frajola) 93/09/10
 *
 * Minor fixes to allow passive SLIP links to work (connections with
 * modem control that do not have an associated dial command). Added
 * code to re-check for carrier after dial command has been executed.
 * Added SIGTERM handler to properly handle normal kill signals. Fixed
 * bug in logic that caused message about no -u command to be logged
 * even when -u was specified and the sl number changes. Tried to get
 * rid of redundant syslog()'s to minimize console log output. Improved
 * logging of improper command line options or number of command
 * arguments. Removed spurious newline characters from syslog() calls.
 *
 * gjung@gjbsd.franken.de
 *
 * sighup_handler changed to set CLOCAL before running redial_cmd.
 * added flag exiting, so exit_handler is not run twice.  Fork
 * before reopening tty.
 */
1994-08-23 08:07:17 +00:00
Garrett Wollman
404c1a5fc1 Convert to our man installation style. Also fixed long-standing bug
in `fastboot'/`fasthalt' in which the interpreter would hang around
after `reboot' or `halt' is run, causing an irritating ``Killed'' message.
1994-08-05 02:42:42 +00:00
Rodney W. Grimes
8fae3551ec BSD 4.4 Lite sbin Sources
Note:  XNSrouted and routed NOT imported here, they shall be imported with
usr.sbin.
1994-05-26 06:35:07 +00:00