Commit Graph

43 Commits

Author SHA1 Message Date
peter
76f0c923fe $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
kris
951fba952c sprintf -> snprintf
Obtained from:	OpenBSD
1999-06-06 07:18:49 +00:00
kris
659ebc8fe9 $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
bde
b7b0859c3f Fixed printf format errors. 1998-08-02 16:06:35 +00:00
bde
21b894709f Fixed printf format errors. 1998-06-28 20:33:36 +00:00
jb
2248def17a 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
jb
f8e8406f2f signal() returns an pointer, so must be cast to long, not int before
comparing < 0.
1998-01-25 09:16:55 +00:00
eivind
69e3c44260 Remove unused private include files from slattach.
Submitted by:	bde
1997-12-21 13:42:27 +00:00
charnier
7f9d40cba7 Use err(3). Add usage(). 1997-06-19 14:33:42 +00:00
danny
285de91cc0 Fix typo: "oder" -> "order". 1997-04-16 09:56:30 +00:00
brian
cb7f5ad555 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
10839f0219 Move uucplock into libutil and create a manual page. 1997-03-30 12:12:20 +00:00
imp
167db52912 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
4968036f61 Revert $FreeBSD$ to $Id$ 1997-02-22 14:40:44 +00:00
jkh
808a36ef65 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
wosch
71f5160702 Sort cross references. 1997-01-13 00:25:51 +00:00
wollman
5972643f58 Update to match changes in <net/if.h>. 1997-01-03 20:19:50 +00:00
wollman
af7727cb96 Fix if.h lossage. I could have sworn I already fixed this one. 1996-12-10 21:25:42 +00:00
wollman
d3ecee07b3 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
ache
788abb3288 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
ache
c018beaf94 Re-open line after hangup in any case 1996-03-12 12:56:27 +00:00
ache
11d43035a0 Call unit-command -1 <new> first time connected, close PR 569 1996-02-17 19:21:41 +00:00
mpp
0d925cfda3 Fix a bunch of spelling errors. 1996-01-29 23:52:43 +00:00
peter
ab124e78b0 recording cvs-1.6 file death 1995-12-30 19:02:48 +00:00
nate
10c008dd04 Convert to proper English in the same manner as the sliplogin manpage. 1995-10-26 05:13:54 +00:00
joerg
695113e9d5 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
ache
ff57306bc4 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
ache
241d9dc635 Make uucp-locking optional: -L option 1995-09-20 04:53:08 +00:00
ache
545650b894 Unlock device for redial_cmd, then lock again 1995-09-19 09:07:51 +00:00
ache
f7ecd9bbc1 Implement uucp-locking
Cleanup debug/syslog code
1995-09-19 03:27:31 +00:00
ache
6b2ee7716a Change new -U option to -S to go the same way as startslip. 1995-09-18 14:06:38 +00:00
ache
403d6f6b4d 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
rgrimes
f3a2b348da Remove trailing whitespace. 1995-05-30 06:12:45 +00:00
joerg
aa3df4d05b 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
c019fd7240 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
ache
cc94453d73 configure_network() if carrier already present
Submitted by: serg@opus.opu.odessa.ua
1995-02-25 18:06:23 +00:00
ache
75b7af8528 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
ache
8dc5437565 Remove extra :%s from syslog formats 1994-11-01 08:34:32 +00:00
dg
c5f5d0f6cb 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
6276564167 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
3492ba7f66 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
wollman
57ea13e98c 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
rgrimes
d038e02fd6 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