mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-11 17:04:19 +01:00
Cosmetic: Tidy up.
Submitted by: Theo de Raadt <deraadt@cvs.openbsd.org>
This commit is contained in:
parent
857a4bf337
commit
25ee22f573
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=31916
@ -1,4 +1,4 @@
|
|||||||
.\" $Id: pppctl.8,v 1.7 1997/11/18 00:20:28 brian Exp $
|
.\" $Id: pppctl.8,v 1.8 1997/12/21 01:21:40 brian Exp $
|
||||||
.Dd 26 June 1997
|
.Dd 26 June 1997
|
||||||
.Os FreeBSD
|
.Os FreeBSD
|
||||||
.Dt PPPCTL 8
|
.Dt PPPCTL 8
|
||||||
@ -18,7 +18,7 @@ This program provides command line control of the
|
|||||||
.Xr ppp 8
|
.Xr ppp 8
|
||||||
daemon. Its primary use is to facilitate simple scripts that
|
daemon. Its primary use is to facilitate simple scripts that
|
||||||
control a running daemon.
|
control a running daemon.
|
||||||
|
.Pp
|
||||||
.Nm Pppctl
|
.Nm Pppctl
|
||||||
is passed at least one argument, specifying the socket on which
|
is passed at least one argument, specifying the socket on which
|
||||||
.Nm ppp
|
.Nm ppp
|
||||||
@ -39,7 +39,6 @@ and
|
|||||||
may be specified numerically if you wish to avoid a DNS lookup
|
may be specified numerically if you wish to avoid a DNS lookup
|
||||||
or don't have an entry for the given port in
|
or don't have an entry for the given port in
|
||||||
.Pa /etc/services .
|
.Pa /etc/services .
|
||||||
|
|
||||||
.Pp
|
.Pp
|
||||||
All remaining arguments are concatenated to form the
|
All remaining arguments are concatenated to form the
|
||||||
.Ar command(s)
|
.Ar command(s)
|
||||||
@ -52,12 +51,13 @@ delimiters, allowing more than one
|
|||||||
in a given
|
in a given
|
||||||
.Sq session .
|
.Sq session .
|
||||||
For example:
|
For example:
|
||||||
|
.Bd -literal -offset indent
|
||||||
pppctl 3000 set timeout 300\\; show timeout
|
pppctl 3000 set timeout 300\\; show timeout
|
||||||
|
.Ed
|
||||||
|
.Pp
|
||||||
Don't forget to escape or quote the ';' as it is a special character
|
Don't forget to escape or quote the ';' as it is a special character
|
||||||
for most shells.
|
for most shells.
|
||||||
|
.Pp
|
||||||
If no
|
If no
|
||||||
.Ar command
|
.Ar command
|
||||||
arguments are given,
|
arguments are given,
|
||||||
@ -70,7 +70,7 @@ library is used, allowing command-line editing (with
|
|||||||
defining editing behaviour). The history size
|
defining editing behaviour). The history size
|
||||||
defaults to
|
defaults to
|
||||||
.Em 20 lines .
|
.Em 20 lines .
|
||||||
|
.Pp
|
||||||
The following command line options are available:
|
The following command line options are available:
|
||||||
.Bl -tag -width Ds
|
.Bl -tag -width Ds
|
||||||
.It Fl v
|
.It Fl v
|
||||||
@ -93,7 +93,7 @@ daemon. If this switch is not used,
|
|||||||
will prompt for a password once it has successfully connected to
|
will prompt for a password once it has successfully connected to
|
||||||
.Nm ppp .
|
.Nm ppp .
|
||||||
.El
|
.El
|
||||||
|
.Pp
|
||||||
.Sh EXAMPLES
|
.Sh EXAMPLES
|
||||||
If you run
|
If you run
|
||||||
.Nm ppp
|
.Nm ppp
|
||||||
@ -115,11 +115,10 @@ The best way to allow easy, secure
|
|||||||
access is to create a local server socket in
|
access is to create a local server socket in
|
||||||
.Pa /etc/ppp/ppp.conf
|
.Pa /etc/ppp/ppp.conf
|
||||||
(in the correct section) like this:
|
(in the correct section) like this:
|
||||||
|
|
||||||
.Bd -literal -offset indent
|
.Bd -literal -offset indent
|
||||||
set server /var/run/internet "" 0177
|
set server /var/run/internet "" 0177
|
||||||
.Ed
|
.Ed
|
||||||
|
.Pp
|
||||||
This will instruct
|
This will instruct
|
||||||
.Nm ppp
|
.Nm ppp
|
||||||
to create a local domain socket, with srw------- permissions and no
|
to create a local domain socket, with srw------- permissions and no
|
||||||
@ -128,23 +127,19 @@ password, allowing access only to the user that invoked
|
|||||||
Refer to the
|
Refer to the
|
||||||
.Xr ppp 8
|
.Xr ppp 8
|
||||||
man page for further details.
|
man page for further details.
|
||||||
|
|
||||||
.Pp
|
.Pp
|
||||||
You can now create some easy-access scripts. To connect to the internet:
|
You can now create some easy-access scripts. To connect to the internet:
|
||||||
|
|
||||||
.Bd -literal -offset indent
|
.Bd -literal -offset indent
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
test $# -eq 0 && time=300 || time=$1
|
test $# -eq 0 && time=300 || time=$1
|
||||||
exec pppctl /var/run/internet set timeout $time\\; dial
|
exec pppctl /var/run/internet set timeout $time\\; dial
|
||||||
.Ed
|
.Ed
|
||||||
|
|
||||||
.Pp
|
.Pp
|
||||||
To disconnect:
|
To disconnect:
|
||||||
.Bd -literal -offset indent
|
.Bd -literal -offset indent
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
exec pppctl /var/run/internet set timeout 300\\; close
|
exec pppctl /var/run/internet set timeout 300\\; close
|
||||||
.Ed
|
.Ed
|
||||||
|
|
||||||
.Pp
|
.Pp
|
||||||
To check if the line is up:
|
To check if the line is up:
|
||||||
.Bd -literal -offset indent
|
.Bd -literal -offset indent
|
||||||
@ -156,14 +151,13 @@ else
|
|||||||
echo Link is down
|
echo Link is down
|
||||||
fi
|
fi
|
||||||
.Ed
|
.Ed
|
||||||
|
|
||||||
.Pp
|
.Pp
|
||||||
You can even make a generic script:
|
You can even make a generic script:
|
||||||
.Bd -literal -offset indent
|
.Bd -literal -offset indent
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
exec pppctl /var/run/internet "$@"
|
exec pppctl /var/run/internet "$@"
|
||||||
.Ed
|
.Ed
|
||||||
|
.Pp
|
||||||
.Sh ENVIRONMENT VARIABLES
|
.Sh ENVIRONMENT VARIABLES
|
||||||
The following environment variables are understood by
|
The following environment variables are understood by
|
||||||
.Nm
|
.Nm
|
||||||
@ -180,14 +174,13 @@ and
|
|||||||
commands in
|
commands in
|
||||||
.Pa ~/.editrc .
|
.Pa ~/.editrc .
|
||||||
.El
|
.El
|
||||||
|
.Pp
|
||||||
.Sh SEE ALSO
|
.Sh SEE ALSO
|
||||||
.Xr editline 3 ,
|
.Xr editline 3 ,
|
||||||
.Xr editrc 5 ,
|
.Xr editrc 5 ,
|
||||||
.Xr ppp 8 ,
|
.Xr ppp 8 ,
|
||||||
.Xr ps 1 ,
|
.Xr ps 1 ,
|
||||||
.Xr services 5
|
.Xr services 5
|
||||||
|
|
||||||
.Sh HISTORY
|
.Sh HISTORY
|
||||||
The
|
The
|
||||||
.Nm
|
.Nm
|
||||||
|
Loading…
Reference in New Issue
Block a user