1 diff -urN rp-pppoe-3.7.orig/scripts/pppoe-setup.in rp-pppoe-3.7/scripts/pppoe-setup.in
2 --- rp-pppoe-3.7.orig/scripts/pppoe-setup.in 2005-11-17 03:14:32.000000000 +0100
3 +++ rp-pppoe-3.7/scripts/pppoe-setup.in 2005-12-21 17:29:08.000000000 +0100
5 IFCONFIG=/sbin/ifconfig
9 LOGGER="/usr/bin/logger -t `basename $0`"
11 # Set to "C" locale so we can parse messages from commands
15 if [ "$?" != 0 ] ; then
16 - $ECHO "*** Error copying $1 to $2"
17 - $ECHO "*** Quitting."
18 + echo "*** Error copying $1 to $2"
19 + echo "*** Quitting."
24 -$ECHO "Welcome to the Roaring Penguin PPPoE client setup. First, I will run"
25 -$ECHO "some checks on your system to make sure the PPPoE client is installed"
28 +echo "Welcome to the Roaring Penguin PPPoE client setup. First, I will run"
29 +echo "some checks on your system to make sure the PPPoE client is installed"
34 if [ "`@ID@ -u`" != 0 ] ; then
35 - $ECHO "$0: Sorry, you must be root to run this script"
36 + echo "$0: Sorry, you must be root to run this script"
40 # Prototype config file must exist
41 if [ ! -r "$CONFIG" ] ; then
42 - $ECHO "Oh, dear, I don't see the file '$CONFIG' anywhere. Please"
43 - $ECHO "re-install the PPPoE client."
44 + echo "Oh, dear, I don't see the file '$CONFIG' anywhere. Please"
45 + echo "re-install the PPPoE client."
50 if [ ! -x $PPPD ] ; then
51 - $ECHO "Oops, I can't execute the program '$PPPD'. You"
52 - $ECHO "must install the PPP software suite, version 2.3.10 or later."
53 + echo "Oops, I can't execute the program '$PPPD'. You"
54 + echo "must install the PPP software suite, version 2.3.10 or later."
61 if [ ! -x "$PPPOE" ] ; then
62 - $ECHO "Oh, dear, I can't execute the program '$PPPOE'. Please"
63 - $ECHO "re-install the rp-pppoe client."
64 + echo "Oh, dear, I can't execute the program '$PPPOE'. Please"
65 + echo "re-install the rp-pppoe client."
69 -$ECHO "Looks good! Now, please enter some information:"
70 +echo "Looks good! Now, please enter some information:"
79 printf "%s" ">>> Enter your PPPoE user name (default $USER): "
83 if test `uname -s` = "Linux" ; then
84 $IFCONFIG $ETH > /dev/null 2>&1 || ETH=eth0
89 - $ECHO ">>> Enter the Ethernet interface connected to the DSL modem"
90 - $ECHO "For Solaris, this is likely to be something like /dev/hme0."
91 - $ECHO "For Linux, it will be ethn, where 'n' is a number."
95 + echo ">>> Enter the Ethernet interface connected to the DSL modem"
96 + echo "For Solaris, this is likely to be something like /dev/hme0."
97 + echo "For Linux, it will be ethn, where 'n' is a number."
98 printf "%s" "(default $ETH): "
101 @@ -109,27 +108,27 @@
106 - $ECHO "Do you want the link to come up on demand, or stay up continuously?"
107 - $ECHO "If you want it to come up on demand, enter the idle time in seconds"
108 - $ECHO "after which the link should be dropped. If you want the link to"
109 - $ECHO "stay up permanently, enter 'no' (two letters, lower-case.)"
110 - $ECHO "NOTE: Demand-activated links do not interact well with dynamic IP"
111 - $ECHO "addresses. You may have some problems with demand-activated links."
113 + echo "Do you want the link to come up on demand, or stay up continuously?"
114 + echo "If you want it to come up on demand, enter the idle time in seconds"
115 + echo "after which the link should be dropped. If you want the link to"
116 + echo "stay up permanently, enter 'no' (two letters, lower-case.)"
117 + echo "NOTE: Demand-activated links do not interact well with dynamic IP"
118 + echo "addresses. You may have some problems with demand-activated links."
119 printf "%s" ">>> Enter the demand value (default $DEMAND): "
121 if [ "$D" = "" ] ; then
128 - $ECHO "Please enter the IP address of your ISP's primary DNS server."
129 - $ECHO "If your ISP claims that 'the server will provide DNS addresses',"
130 - $ECHO "enter 'server' (all lower-case) here."
131 - $ECHO "If you just press enter, I will assume you know what you are"
132 - $ECHO "doing and not modify your DNS setup."
136 + echo "Please enter the IP address of your ISP's primary DNS server."
137 + echo "If your ISP claims that 'the server will provide DNS addresses',"
138 + echo "enter 'server' (all lower-case) here."
139 + echo "If you just press enter, I will assume you know what you are"
140 + echo "doing and not modify your DNS setup."
141 printf "%s" ">>> Enter the DNS information here: "
144 @@ -137,24 +136,24 @@
146 if [ "$DNS1" != "" ] ; then
147 if [ "$DNS1" != "server" ] ; then
148 - $ECHO "Please enter the IP address of your ISP's secondary DNS server."
149 - $ECHO "If you just press enter, I will assume there is only one DNS server."
150 + echo "Please enter the IP address of your ISP's secondary DNS server."
151 + echo "If you just press enter, I will assume there is only one DNS server."
152 printf "%s" ">>> Enter the secondary DNS server address here: "
165 printf "%s" ">>> Please enter your PPPoE password: "
169 printf "%s" ">>> Please re-enter your PPPoE password: "
174 if [ "$PWD1" = "$PWD2" ] ; then
176 @@ -164,44 +163,44 @@
179 N|No|NO|Non|n|no|non)
180 - $ECHO "OK, quitting. Bye."
181 + echo "OK, quitting. Bye."
188 - $ECHO "FIREWALLING"
193 if test `uname -s` != "Linux" ; then
194 - $ECHO "Sorry, firewalling is only supported under Linux. Consult"
195 - $ECHO "your operating system manuals for details on setting up"
196 - $ECHO "packet filters for your system."
197 + echo "Sorry, firewalling is only supported under Linux. Consult"
198 + echo "your operating system manuals for details on setting up"
199 + echo "packet filters for your system."
202 - $ECHO "Please choose the firewall rules to use. Note that these rules are"
203 - $ECHO "very basic. You are strongly encouraged to use a more sophisticated"
204 - $ECHO "firewall setup; however, these will provide basic security. If you"
205 - $ECHO "are running any servers on your machine, you must choose 'NONE' and"
206 - $ECHO "set up firewalling yourself. Otherwise, the firewall rules will deny"
207 - $ECHO "access to all standard servers like Web, e-mail, ftp, etc. If you"
208 - $ECHO "are using SSH, the rules will block outgoing SSH connections which"
209 - $ECHO "allocate a privileged source port."
211 + echo "Please choose the firewall rules to use. Note that these rules are"
212 + echo "very basic. You are strongly encouraged to use a more sophisticated"
213 + echo "firewall setup; however, these will provide basic security. If you"
214 + echo "are running any servers on your machine, you must choose 'NONE' and"
215 + echo "set up firewalling yourself. Otherwise, the firewall rules will deny"
216 + echo "access to all standard servers like Web, e-mail, ftp, etc. If you"
217 + echo "are using SSH, the rules will block outgoing SSH connections which"
218 + echo "allocate a privileged source port."
221 - $ECHO "The firewall choices are:"
222 - $ECHO "0 - NONE: This script will not set any firewall rules. You are responsible"
223 - $ECHO " for ensuring the security of your machine. You are STRONGLY"
224 - $ECHO " recommended to use some kind of firewall rules."
225 - $ECHO "1 - STANDALONE: Appropriate for a basic stand-alone web-surfing workstation"
226 - $ECHO "2 - MASQUERADE: Appropriate for a machine acting as an Internet gateway"
228 + echo "The firewall choices are:"
229 + echo "0 - NONE: This script will not set any firewall rules. You are responsible"
230 + echo " for ensuring the security of your machine. You are STRONGLY"
231 + echo " recommended to use some kind of firewall rules."
232 + echo "1 - STANDALONE: Appropriate for a basic stand-alone web-surfing workstation"
233 + echo "2 - MASQUERADE: Appropriate for a machine acting as an Internet gateway"
235 printf "%s" ">>> Choose a type of firewall (0-2): "
237 if [ "$a" = 0 -o "$a" = 1 -o "$a" = 2 ] ; then
240 - $ECHO "Please enter a number from 0 to 2"
241 + echo "Please enter a number from 0 to 2"
245 @@ -217,31 +216,31 @@
250 - $ECHO "** Summary of what you entered **"
252 - $ECHO "Ethernet Interface: $E"
253 - $ECHO "User name: $U"
255 + echo "** Summary of what you entered **"
257 + echo "Ethernet Interface: $E"
258 + echo "User name: $U"
259 if [ "$D" = "no" ] ; then
260 - $ECHO "Activate-on-demand: No"
261 + echo "Activate-on-demand: No"
263 - $ECHO "Activate-on-demand: Yes; idle timeout = $D seconds"
264 + echo "Activate-on-demand: Yes; idle timeout = $D seconds"
267 if [ "$DNS1" != "" ] ; then
268 if [ "$DNS1" = "server" ] ; then
269 - $ECHO "DNS addresses: Supplied by ISP's server"
270 + echo "DNS addresses: Supplied by ISP's server"
272 - $ECHO "Primary DNS: $DNS1"
273 + echo "Primary DNS: $DNS1"
274 if [ "$DNS2" != "" ] ; then
275 - $ECHO "Secondary DNS: $DNS2"
276 + echo "Secondary DNS: $DNS2"
280 - $ECHO "DNS: Do not adjust"
281 + echo "DNS: Do not adjust"
283 - $ECHO "Firewalling: $FIREWALL"
285 + echo "Firewalling: $FIREWALL"
288 printf "%s" '>>> Accept these settings and adjust configuration files (y/n)? '
292 # Adjust configuration files. First to $CONFIG
294 -$ECHO "Adjusting $CONFIG"
295 +echo "Adjusting $CONFIG"
297 copy $CONFIG $CONFIG-bak
298 if [ "$DNS1" = "server" ] ; then
299 @@ -300,53 +299,53 @@
300 < $CONFIG-bak > $CONFIG
302 if [ $? != 0 ] ; then
303 - $ECHO "** Error modifying $CONFIG"
304 - $ECHO "** Quitting"
305 + echo "** Error modifying $CONFIG"
310 if [ "$DNS1" != "" ] ; then
311 if [ "$DNS1" != "server" ] ; then
312 - $ECHO "Adjusting /etc/resolv.conf"
313 + echo "Adjusting /etc/resolv.conf"
314 if [ -r /etc/resolv.conf ] ; then
315 grep -s "MADE-BY-RP-PPPOE" /etc/resolv.conf > /dev/null 2>&1
316 if [ "$?" != 0 ] ; then
317 - $ECHO " (But first backing it up to /etc/resolv.conf-bak)"
318 + echo " (But first backing it up to /etc/resolv.conf-bak)"
319 copy /etc/resolv.conf /etc/resolv.conf-bak
322 - $ECHO "# MADE-BY-RP-PPPOE" > /etc/resolv.conf
323 - $ECHO "nameserver $DNS1" >> /etc/resolv.conf
324 + echo "# MADE-BY-RP-PPPOE" > /etc/resolv.conf
325 + echo "nameserver $DNS1" >> /etc/resolv.conf
326 if [ "$DNS2" != "" ] ; then
327 - $ECHO "nameserver $DNS2" >> /etc/resolv.conf
328 + echo "nameserver $DNS2" >> /etc/resolv.conf
333 -$ECHO "Adjusting /etc/ppp/pap-secrets and /etc/ppp/chap-secrets"
334 +echo "Adjusting /etc/ppp/pap-secrets and /etc/ppp/chap-secrets"
335 if [ -r /etc/ppp/pap-secrets ] ; then
336 - $ECHO " (But first backing it up to /etc/ppp/pap-secrets-bak)"
337 + echo " (But first backing it up to /etc/ppp/pap-secrets-bak)"
338 copy /etc/ppp/pap-secrets /etc/ppp/pap-secrets-bak
340 cp /dev/null /etc/ppp/pap-secrets-bak
342 if [ -r /etc/ppp/chap-secrets ] ; then
343 - $ECHO " (But first backing it up to /etc/ppp/chap-secrets-bak)"
344 + echo " (But first backing it up to /etc/ppp/chap-secrets-bak)"
345 copy /etc/ppp/chap-secrets /etc/ppp/chap-secrets-bak
347 cp /dev/null /etc/ppp/chap-secrets-bak
350 egrep -v "^$U|^\"$U\"" /etc/ppp/pap-secrets-bak > /etc/ppp/pap-secrets
351 -$ECHO "\"$U\" * \"$PWD1\"" >> /etc/ppp/pap-secrets
352 +echo "\"$U\" * \"$PWD1\"" >> /etc/ppp/pap-secrets
353 egrep -v "^$U|^\"$U\"" /etc/ppp/chap-secrets-bak > /etc/ppp/chap-secrets
354 -$ECHO "\"$U\" * \"$PWD1\"" >> /etc/ppp/chap-secrets
355 +echo "\"$U\" * \"$PWD1\"" >> /etc/ppp/chap-secrets
360 -$ECHO "Congratulations, it should be all set up!"
362 -$ECHO "Type 'pppoe-start' to bring up your PPPoE link and 'pppoe-stop' to bring"
363 -$ECHO "it down. Type 'pppoe-status' to see the link status."
367 +echo "Congratulations, it should be all set up!"
369 +echo "Type 'pppoe-start' to bring up your PPPoE link and 'pppoe-stop' to bring"
370 +echo "it down. Type 'pppoe-status' to see the link status."
372 diff -urN rp-pppoe-3.7.orig/scripts/pppoe-start.in rp-pppoe-3.7/scripts/pppoe-start.in
373 --- rp-pppoe-3.7.orig/scripts/pppoe-start.in 2005-11-17 03:14:32.000000000 +0100
374 +++ rp-pppoe-3.7/scripts/pppoe-start.in 2005-12-21 17:29:28.000000000 +0100
378 CONNECT=@sbindir@/pppoe-connect
380 IFCONFIG=/sbin/ifconfig
382 # Set to "C" locale so we can parse messages from commands
386 if [ "`@ID@ -u`" != 0 ] ; then
387 - $ECHO "$ME: You must be root to run this script" >& 2
388 + echo "$ME: You must be root to run this script" >& 2
393 if [ "$DEBUG" = "1" ] ; then
394 - $ECHO "*** Running in debug mode... please be patient..."
395 + echo "*** Running in debug mode... please be patient..."
396 DEBUG=/tmp/pppoe-debug-$$
399 if [ "$?" != 0 ] ; then
400 - $ECHO "Could not create directory $DEBUG... exiting"
401 + echo "Could not create directory $DEBUG... exiting"
404 DEBUG=$DEBUG/pppoe-debug.txt
406 # Initial debug output
407 - $ECHO "---------------------------------------------" > $DEBUG
408 - $ECHO "* The following section contains information about your system" >> $DEBUG
409 + echo "---------------------------------------------" > $DEBUG
410 + echo "* The following section contains information about your system" >> $DEBUG
412 - $ECHO "Output of uname -a" >> $DEBUG
413 + echo "Output of uname -a" >> $DEBUG
415 - $ECHO "---------------------------------------------" >> $DEBUG
416 - $ECHO "* The following section contains information about your network" >> $DEBUG
417 - $ECHO "* interfaces. The one you chose for PPPoE should contain the words:" >> $DEBUG
418 - $ECHO "* 'UP' and 'RUNNING'. If it does not, you probably have an Ethernet" >> $DEBUG
419 - $ECHO "* driver problem." >> $DEBUG
420 - $ECHO "Output of ifconfig -a" >> $DEBUG
421 + echo "---------------------------------------------" >> $DEBUG
422 + echo "* The following section contains information about your network" >> $DEBUG
423 + echo "* interfaces. The one you chose for PPPoE should contain the words:" >> $DEBUG
424 + echo "* 'UP' and 'RUNNING'. If it does not, you probably have an Ethernet" >> $DEBUG
425 + echo "* driver problem." >> $DEBUG
426 + echo "Output of ifconfig -a" >> $DEBUG
427 $IFCONFIG -a >> $DEBUG
428 - $ECHO "---------------------------------------------" >> $DEBUG
429 + echo "---------------------------------------------" >> $DEBUG
430 if [ "`uname -s`" = "Linux" ] ; then
431 - $ECHO "* The following section contains information about kernel modules" >> $DEBUG
432 - $ECHO "* If the module for your Ethernet card is 'tulip', you might" >> $DEBUG
433 - $ECHO "* want to look for an updated version at http://www.scyld.com" >> $DEBUG
434 - $ECHO "Output of lsmod" >> $DEBUG
435 + echo "* The following section contains information about kernel modules" >> $DEBUG
436 + echo "* If the module for your Ethernet card is 'tulip', you might" >> $DEBUG
437 + echo "* want to look for an updated version at http://www.scyld.com" >> $DEBUG
438 + echo "Output of lsmod" >> $DEBUG
440 - $ECHO "---------------------------------------------" >> $DEBUG
441 + echo "---------------------------------------------" >> $DEBUG
443 - $ECHO "* The following section lists your routing table." >> $DEBUG
444 - $ECHO "* If you have an entry which starts with '0.0.0.0', you probably" >> $DEBUG
445 - $ECHO "* have defined a default route and gateway, and pppd will" >> $DEBUG
446 - $ECHO "* not create a default route using your ISP. Try getting" >> $DEBUG
447 - $ECHO "* rid of this route." >> $DEBUG
448 - $ECHO "Output of netstat -n -r" >> $DEBUG
449 + echo "* The following section lists your routing table." >> $DEBUG
450 + echo "* If you have an entry which starts with '0.0.0.0', you probably" >> $DEBUG
451 + echo "* have defined a default route and gateway, and pppd will" >> $DEBUG
452 + echo "* not create a default route using your ISP. Try getting" >> $DEBUG
453 + echo "* rid of this route." >> $DEBUG
454 + echo "Output of netstat -n -r" >> $DEBUG
455 netstat -n -r >> $DEBUG
456 - $ECHO "---------------------------------------------" >> $DEBUG
457 - $ECHO "Contents of /etc/resolv.conf" >> $DEBUG
458 - $ECHO "* The following section lists DNS setup." >> $DEBUG
459 - $ECHO "* If you can browse by IP address, but not name, suspect" >> $DEBUG
460 - $ECHO "* a DNS problem." >> $DEBUG
461 + echo "---------------------------------------------" >> $DEBUG
462 + echo "Contents of /etc/resolv.conf" >> $DEBUG
463 + echo "* The following section lists DNS setup." >> $DEBUG
464 + echo "* If you can browse by IP address, but not name, suspect" >> $DEBUG
465 + echo "* a DNS problem." >> $DEBUG
466 cat /etc/resolv.conf >> $DEBUG
467 - $ECHO "---------------------------------------------" >> $DEBUG
468 - $ECHO "* The following section lists /etc/ppp/options." >> $DEBUG
469 - $ECHO "* You should have NOTHING in that file." >> $DEBUG
470 - $ECHO "Contents of /etc/ppp/options" >> $DEBUG
471 + echo "---------------------------------------------" >> $DEBUG
472 + echo "* The following section lists /etc/ppp/options." >> $DEBUG
473 + echo "* You should have NOTHING in that file." >> $DEBUG
474 + echo "Contents of /etc/ppp/options" >> $DEBUG
475 cat /etc/ppp/options >> $DEBUG 2>/dev/null
476 - $ECHO "---------------------------------------------" >> $DEBUG
477 + echo "---------------------------------------------" >> $DEBUG
484 if [ ! -f "$CONFIG" -o ! -r "$CONFIG" ] ; then
485 - $ECHO "$ME: Cannot read configuration file '$CONFIG'" >& 2
486 + echo "$ME: Cannot read configuration file '$CONFIG'" >& 2
491 # Check if still running
492 kill -0 $PID > /dev/null 2>&1
494 - $ECHO "$ME: There already seems to be a PPPoE connection up (PID $PID)" >& 2
495 + echo "$ME: There already seems to be a PPPoE connection up (PID $PID)" >& 2
498 # Delete bogus PIDFILE
500 # Looks like the interface came up
502 # Print newline if standard input is a TTY
503 - tty -s && $ECHO " Connected!"
504 + tty -s && echo " Connected!"
512 -$ECHO "TIMED OUT" >& 2
513 +echo "TIMED OUT" >& 2
514 # Timed out! Kill the pppoe-connect process and quit
515 kill $CONNECT_PID > /dev/null 2>&1
517 diff -urN rp-pppoe-3.7.orig/src/configure.in rp-pppoe-3.7/src/configure.in
518 --- rp-pppoe-3.7.orig/src/configure.in 2005-11-17 03:14:32.000000000 +0100
519 +++ rp-pppoe-3.7/src/configure.in 2005-12-21 17:35:35.000000000 +0100
521 AC_MSG_WARN([*** Oops! I couldn't find pppd, the PPP daemon anywhere.])
522 AC_MSG_WARN([*** You must install pppd, version 2.3.10 or later.])
523 AC_MSG_WARN([*** I will keep going, but it may not work.])
525 + PPPD="/usr/sbin/pppd"
528 dnl Figure out pppd version. 2.3.7 to 2.3.9 -- issue warning. Less than