aboutsummaryrefslogtreecommitdiff
path: root/sbin/slattach
Commit message (Collapse)AuthorAgeFilesLines
* Remove the casts on signal() returns and compare the returned valueJohn Birrell1998-02-201-5/+5
| | | | | | | | | with SIG_ERR to detect the error case. Suggested by: bde. Notes: svn path=/head/; revision=33659
* signal() returns an pointer, so must be cast to long, not int beforeJohn Birrell1998-01-251-5/+5
| | | | | | | comparing < 0. Notes: svn path=/head/; revision=32759
* Remove unused private include files from slattach.Eivind Eklund1997-12-211-8/+3
| | | | | | | Submitted by: bde Notes: svn path=/head/; revision=31922
* Use err(3). Add usage().Philippe Charnier1997-06-191-34/+21
| | | | Notes: svn path=/head/; revision=26738
* Fix typo: "oder" -> "order".Daniel O'Callaghan1997-04-161-2/+2
| | | | Notes: svn path=/head/; revision=24978
* Remove the syslog stuff, and allow various return valuesBrian Somers1997-03-311-3/+10
| | | | | | | | | | | | 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 Notes: svn path=/head/; revision=24461
* Move uucplock into libutil and create a manual page.Brian Somers1997-03-301-4/+2
| | | | Notes: svn path=/head/; revision=24417
* compare return value from getopt against -1 rather than EOF, per the finalWarner Losh1997-03-291-2/+2
| | | | | | | posix standard on the topic. Notes: svn path=/head/; revision=24359
* Revert $FreeBSD$ to $Id$Peter Wemm1997-02-221-1/+1
| | | | Notes: svn path=/head/; revision=22990
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-141-1/+1
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=21673
* Sort cross references.Wolfram Schneider1997-01-131-4/+4
| | | | Notes: svn path=/head/; revision=21635
* Update to match changes in <net/if.h>.Garrett Wollman1997-01-031-1/+2
| | | | Notes: svn path=/head/; revision=21264
* Fix if.h lossage. I could have sworn I already fixed this one.Garrett Wollman1996-12-101-2/+3
| | | | Notes: svn path=/head/; revision=20295
* Fix up programs which expect <net/if.h> to include <sys/time.h> to insteadGarrett Wollman1996-12-101-11/+14
| | | | | | | | | 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. Notes: svn path=/head/; revision=20287
* Properly distinguish 3 different cases:Andrey A. Chernov1996-03-122-10/+23
| | | | | | | | No redial command. Empty redial command. Non-empty redial command. Pointed-by: bde Notes: svn path=/head/; revision=14606
* Re-open line after hangup in any caseAndrey A. Chernov1996-03-121-15/+2
| | | | Notes: svn path=/head/; revision=14586
* Call unit-command -1 <new> first time connected, close PR 569Andrey A. Chernov1996-02-172-9/+18
| | | | Notes: svn path=/head/; revision=14128
* Fix a bunch of spelling errors.Mike Pritchard1996-01-291-5/+5
| | | | Notes: svn path=/head/; revision=13720
* recording cvs-1.6 file deathPeter Wemm1995-12-301-143/+0
| | | | Notes: svn path=/cvs2svn/branches/ATT/; revision=13122
* Convert to proper English in the same manner as the sliplogin manpage.Nate Williams1995-10-261-12/+11
| | | | Notes: svn path=/head/; revision=11795
* Call the -u UCMD command on exit. The command is called with theJoerg Wunsch1995-09-291-0/+9
| | | | | | | | | | | 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. Notes: svn path=/head/; revision=11075
* From Bruce:Andrey A. Chernov1995-09-202-4/+26
| | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=10922
* Make uucp-locking optional: -L optionAndrey A. Chernov1995-09-202-53/+105
| | | | Notes: svn path=/head/; revision=10911
* Unlock device for redial_cmd, then lock againAndrey A. Chernov1995-09-191-0/+8
| | | | Notes: svn path=/head/; revision=10897
* Implement uucp-lockingAndrey A. Chernov1995-09-193-10/+172
| | | | | | | Cleanup debug/syslog code Notes: svn path=/head/; revision=10888
* Change new -U option to -S to go the same way as startslip.Andrey A. Chernov1995-09-182-7/+7
| | | | Notes: svn path=/head/; revision=10880
* New options:Andrey A. Chernov1995-09-182-30/+113
| | | | | | | | | | | | -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. Notes: svn path=/head/; revision=10878
* Remove trailing whitespace.Rodney W. Grimes1995-05-301-2/+2
| | | | Notes: svn path=/head/; revision=8871
* Do not try to make any notice if the PID file cannot be created.Joerg Wunsch1995-03-121-3/+1
| | | | | | | | Makes folks happy that run slattach in single-user, where /var/run is probably missing. Notes: svn path=/head/; revision=7045
* Make slattach create a PID file under /var/run when the connection isJoerg Wunsch1995-03-122-4/+33
| | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=7037
* configure_network() if carrier already presentAndrey A. Chernov1995-02-251-2/+4
| | | | | | | Submitted by: serg@opus.opu.odessa.ua Notes: svn path=/head/; revision=6707
* Check exit code of the dialer, from asa@gw.cronyx.msk.suAndrey A. Chernov1994-11-141-3/+4
| | | | | | | | Set HUPCL as default modem flag, idea from asa@gw.cronyx.msk.su but different implementation. Notes: svn path=/head/; revision=4483
* Remove extra :%s from syslog formatsAndrey A. Chernov1994-11-011-6/+6
| | | | Notes: svn path=/head/; revision=4040
* Fixed slattach to do flags ioctl via network device rather than tty.David Greenman1994-09-141-2/+34
| | | | | | | Submitted by: Rich Murphey, and fixed up by me. Notes: svn path=/head/; revision=2755
* Once again, slattach sources ported from 1.1.5 with fixes.Rich Murphey1994-08-233-172/+122
| | | | | | | | Reviewed by: davidg, bde Submitted by: rich Notes: svn path=/head/; revision=2236
* Slattach ported from 1.1.5 plus Bruce Evans suggested fix (closeRich Murphey1994-08-233-120/+511
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. */ Notes: svn path=/head/; revision=2235
* Convert to our man installation style. Also fixed long-standing bugGarrett Wollman1994-08-051-1/+1
| | | | | | | | in `fastboot'/`fasthalt' in which the interpreter would hang around after `reboot' or `halt' is run, causing an irritating ``Killed'' message. Notes: svn path=/head/; revision=1855
* BSD 4.4 Lite sbin SourcesRodney W. Grimes1994-05-263-0/+270
Note: XNSrouted and routed NOT imported here, they shall be imported with usr.sbin. Notes: svn path=/head/; revision=1558