Add CHAP/PAP question to the ppp setup dialog, simplifying things considerably
for some. Submitted by: Jack O'Neill <jack@germanium.xtalwind.net>
This commit is contained in:
parent
71e13b47ac
commit
d06edb61fa
@ -21,13 +21,15 @@ speed for a hardwired cable).
|
||||
If you're using a modem then PPP is almost certainly your only choice.
|
||||
Make sure that you have your service provider's information handy as
|
||||
you'll need to know it fairly early in the installation process. You
|
||||
will need to know, at the minimum, your service provider's IP address
|
||||
and possibly your own (though you can also leave it blank and allow
|
||||
PPP to negotiate it with your ISP if your ISP supports such dynamic
|
||||
negotiation). You will also need to know how to use the various "AT
|
||||
commands" to dial the ISP with your particular brand of modem as the
|
||||
PPP dialer provides only a very simple terminal emulator and has no
|
||||
"modem capabilities database".
|
||||
will need to know your service provider's IP address, the IP address
|
||||
of your provider's DNS server, and possibly your own IP address unless
|
||||
your ISP supports dynamic negotiation, most do. If you do not choose
|
||||
a PAP or CHAP login you will also need to know how to use the various
|
||||
"AT commands" to dial the ISP with your particular brand of modem as
|
||||
the PPP dialer provides only a very simple terminal emulator and has no
|
||||
"modem capabilities database". If you choose a PAP or CHAP login you
|
||||
can simply enter `dial' (without the quotes) at the ppp prompt if your
|
||||
modem uses the Hayes compatible AT command set.
|
||||
|
||||
If a hard-wired connection to another FreeBSD (2.0R or later) machine
|
||||
is available, you might also consider installing over a "laplink"
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This is probably the last attempt in the `sysinstall' line, the next
|
||||
* generation being slated to essentially a complete rewrite.
|
||||
*
|
||||
* $Id: network.c,v 1.34 1999/02/05 22:15:51 jkh Exp $
|
||||
* $Id: network.c,v 1.35 1999/03/11 18:22:23 brian Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -186,11 +186,12 @@ mediaShutdownNetwork(Device *dev)
|
||||
static pid_t
|
||||
startPPP(Device *devp)
|
||||
{
|
||||
int fd2;
|
||||
int fd2, pulse;
|
||||
FILE *fp;
|
||||
char *val;
|
||||
pid_t pid = 0;
|
||||
char myaddr[16], provider[16], speed[16];
|
||||
char myaddr[16], provider[16], speed[16], authname[32], authkey[16];
|
||||
char phone[16];
|
||||
|
||||
/* These are needed to make ppp work */
|
||||
Mkdir("/var/log");
|
||||
@ -249,6 +250,21 @@ startPPP(Device *devp)
|
||||
msgConfirm("Couldn't open /etc/ppp/ppp.conf file! This isn't going to work");
|
||||
return 0;
|
||||
}
|
||||
authname[0] = '\0';
|
||||
pulse = 0;
|
||||
dialog_clear_norefresh();
|
||||
if (!dialog_yesno("", "Does your ISP support PAP or CHAP ppp logins?", -1, -1)) {
|
||||
val = msgGetInput(NULL, "Enter the name you use to login to your provider.");
|
||||
SAFE_STRCPY(authname, val);
|
||||
dialog_clear_norefresh();
|
||||
val = msgGetInput(NULL, "Enter the password you use to login to your provider.");
|
||||
SAFE_STRCPY(authkey, val);
|
||||
dialog_clear_norefresh();
|
||||
val = msgGetInput(NULL, "Enter the your provider's login phone number.");
|
||||
SAFE_STRCPY(phone, val);
|
||||
dialog_clear_norefresh();
|
||||
pulse = dialog_yesno("", "Does your telephone line support tone dialing?", -1, -1);
|
||||
}
|
||||
fprintf(fp, "default:\n");
|
||||
fprintf(fp, " set speed %s\n", speed);
|
||||
fprintf(fp, " set device %s\n", devp->devname);
|
||||
@ -256,6 +272,13 @@ startPPP(Device *devp)
|
||||
fprintf(fp, " set timeout 0\n");
|
||||
fprintf(fp, " enable dns\n");
|
||||
fprintf(fp, " set log local phase\n");
|
||||
if(authname[0] != '\0'){
|
||||
fprintf(fp, " set dial \"ABORT BUSY ABORT NO\\\\sCARRIER TIMEOUT 5 \\\"\\\" AT OK-AT-OK ATE1Q0 OK \\\\dATD%c\\\\T TIMEOUT 40 CONNECT\"\n", pulse ? 'P' : 'T');
|
||||
fprintf(fp, " set login\n");
|
||||
fprintf(fp, " set authname %s\n", authname);
|
||||
fprintf(fp, " set authkey %s\n", authkey);
|
||||
fprintf(fp, " set phone %s\n", phone);
|
||||
}
|
||||
if (fchmod(fileno(fp), 0640) != 0)
|
||||
msgConfirm("Warning: Failed to fix permissions on /etc/ppp/ppp.conf !");
|
||||
fclose(fp);
|
||||
@ -299,13 +322,14 @@ startPPP(Device *devp)
|
||||
else {
|
||||
dialog_clear_norefresh();
|
||||
msgConfirm("NOTICE: The PPP command is now started on VTY3 (type ALT-F3 to\n"
|
||||
"interact with it, ALT-F1 to switch back here). The only command\n"
|
||||
"you'll probably want or need to use is the \"term\" command\n"
|
||||
"which starts a terminal emulator you can use to talk to your\n"
|
||||
"modem and dial the service provider. Once you're connected,\n"
|
||||
"come back to this screen and press return.\n\n"
|
||||
"DO NOT PRESS [ENTER] HERE UNTIL THE CONNECTION IS FULLY\n"
|
||||
"ESTABLISHED!");
|
||||
"interact with it, ALT-F1 to switch back here). If you are using\n"
|
||||
"a PAP or CHAP login simply enter \"dial\" otherwise you'll need\n"
|
||||
"need to use is the \"term\" command which starts a terminal\n"
|
||||
"emulator you can use to talk to your modem and dial the service\n"
|
||||
"provider. Once you're connected, come back to this screen and\n"
|
||||
"press return.\n\n"
|
||||
"DO NOT PRESS [ENTER] HERE UNTIL THE CONNECTION IS FULLY\n"
|
||||
"ESTABLISHED!");
|
||||
}
|
||||
return pid;
|
||||
}
|
||||
|
@ -21,13 +21,15 @@ speed for a hardwired cable).
|
||||
If you're using a modem then PPP is almost certainly your only choice.
|
||||
Make sure that you have your service provider's information handy as
|
||||
you'll need to know it fairly early in the installation process. You
|
||||
will need to know, at the minimum, your service provider's IP address
|
||||
and possibly your own (though you can also leave it blank and allow
|
||||
PPP to negotiate it with your ISP if your ISP supports such dynamic
|
||||
negotiation). You will also need to know how to use the various "AT
|
||||
commands" to dial the ISP with your particular brand of modem as the
|
||||
PPP dialer provides only a very simple terminal emulator and has no
|
||||
"modem capabilities database".
|
||||
will need to know your service provider's IP address, the IP address
|
||||
of your provider's DNS server, and possibly your own IP address unless
|
||||
your ISP supports dynamic negotiation, most do. If you do not choose
|
||||
a PAP or CHAP login you will also need to know how to use the various
|
||||
"AT commands" to dial the ISP with your particular brand of modem as
|
||||
the PPP dialer provides only a very simple terminal emulator and has no
|
||||
"modem capabilities database". If you choose a PAP or CHAP login you
|
||||
can simply enter `dial' (without the quotes) at the ppp prompt if your
|
||||
modem uses the Hayes compatible AT command set.
|
||||
|
||||
If a hard-wired connection to another FreeBSD (2.0R or later) machine
|
||||
is available, you might also consider installing over a "laplink"
|
||||
|
@ -4,7 +4,7 @@
|
||||
* This is probably the last attempt in the `sysinstall' line, the next
|
||||
* generation being slated to essentially a complete rewrite.
|
||||
*
|
||||
* $Id: network.c,v 1.34 1999/02/05 22:15:51 jkh Exp $
|
||||
* $Id: network.c,v 1.35 1999/03/11 18:22:23 brian Exp $
|
||||
*
|
||||
* Copyright (c) 1995
|
||||
* Jordan Hubbard. All rights reserved.
|
||||
@ -186,11 +186,12 @@ mediaShutdownNetwork(Device *dev)
|
||||
static pid_t
|
||||
startPPP(Device *devp)
|
||||
{
|
||||
int fd2;
|
||||
int fd2, pulse;
|
||||
FILE *fp;
|
||||
char *val;
|
||||
pid_t pid = 0;
|
||||
char myaddr[16], provider[16], speed[16];
|
||||
char myaddr[16], provider[16], speed[16], authname[32], authkey[16];
|
||||
char phone[16];
|
||||
|
||||
/* These are needed to make ppp work */
|
||||
Mkdir("/var/log");
|
||||
@ -249,6 +250,21 @@ startPPP(Device *devp)
|
||||
msgConfirm("Couldn't open /etc/ppp/ppp.conf file! This isn't going to work");
|
||||
return 0;
|
||||
}
|
||||
authname[0] = '\0';
|
||||
pulse = 0;
|
||||
dialog_clear_norefresh();
|
||||
if (!dialog_yesno("", "Does your ISP support PAP or CHAP ppp logins?", -1, -1)) {
|
||||
val = msgGetInput(NULL, "Enter the name you use to login to your provider.");
|
||||
SAFE_STRCPY(authname, val);
|
||||
dialog_clear_norefresh();
|
||||
val = msgGetInput(NULL, "Enter the password you use to login to your provider.");
|
||||
SAFE_STRCPY(authkey, val);
|
||||
dialog_clear_norefresh();
|
||||
val = msgGetInput(NULL, "Enter the your provider's login phone number.");
|
||||
SAFE_STRCPY(phone, val);
|
||||
dialog_clear_norefresh();
|
||||
pulse = dialog_yesno("", "Does your telephone line support tone dialing?", -1, -1);
|
||||
}
|
||||
fprintf(fp, "default:\n");
|
||||
fprintf(fp, " set speed %s\n", speed);
|
||||
fprintf(fp, " set device %s\n", devp->devname);
|
||||
@ -256,6 +272,13 @@ startPPP(Device *devp)
|
||||
fprintf(fp, " set timeout 0\n");
|
||||
fprintf(fp, " enable dns\n");
|
||||
fprintf(fp, " set log local phase\n");
|
||||
if(authname[0] != '\0'){
|
||||
fprintf(fp, " set dial \"ABORT BUSY ABORT NO\\\\sCARRIER TIMEOUT 5 \\\"\\\" AT OK-AT-OK ATE1Q0 OK \\\\dATD%c\\\\T TIMEOUT 40 CONNECT\"\n", pulse ? 'P' : 'T');
|
||||
fprintf(fp, " set login\n");
|
||||
fprintf(fp, " set authname %s\n", authname);
|
||||
fprintf(fp, " set authkey %s\n", authkey);
|
||||
fprintf(fp, " set phone %s\n", phone);
|
||||
}
|
||||
if (fchmod(fileno(fp), 0640) != 0)
|
||||
msgConfirm("Warning: Failed to fix permissions on /etc/ppp/ppp.conf !");
|
||||
fclose(fp);
|
||||
@ -299,13 +322,14 @@ startPPP(Device *devp)
|
||||
else {
|
||||
dialog_clear_norefresh();
|
||||
msgConfirm("NOTICE: The PPP command is now started on VTY3 (type ALT-F3 to\n"
|
||||
"interact with it, ALT-F1 to switch back here). The only command\n"
|
||||
"you'll probably want or need to use is the \"term\" command\n"
|
||||
"which starts a terminal emulator you can use to talk to your\n"
|
||||
"modem and dial the service provider. Once you're connected,\n"
|
||||
"come back to this screen and press return.\n\n"
|
||||
"DO NOT PRESS [ENTER] HERE UNTIL THE CONNECTION IS FULLY\n"
|
||||
"ESTABLISHED!");
|
||||
"interact with it, ALT-F1 to switch back here). If you are using\n"
|
||||
"a PAP or CHAP login simply enter \"dial\" otherwise you'll need\n"
|
||||
"need to use is the \"term\" command which starts a terminal\n"
|
||||
"emulator you can use to talk to your modem and dial the service\n"
|
||||
"provider. Once you're connected, come back to this screen and\n"
|
||||
"press return.\n\n"
|
||||
"DO NOT PRESS [ENTER] HERE UNTIL THE CONNECTION IS FULLY\n"
|
||||
"ESTABLISHED!");
|
||||
}
|
||||
return pid;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user