Re: [Cooker] dynamic DNS and /etc/ppp/ip-up (need to be rethinked?)
On Sun, 17 Aug 2003 11:46:59 +0200 Michael Scherer [EMAIL PROTECTED] wrote: In order to work on a real script, i propose to use the wiki to write the files : http://qa.mandrakesoft.com/twiki/bin/edit/Main/DraftPppScript By the way, i have put ppp maintener in Cc, please use answer to all, thanks :) and, for completeness, i have take a look at /etc/ppp/ipup on debian, it only contains the runparts line of the proposal i have made. Submitted as bug 4881. http://qa.mandrakesoft.com/show_bug.cgi?id=4881 -- Olivier Blin
Re: [Cooker] dynamic DNS and /etc/ppp/ip-up (need to be rethinked ?)
On Sunday 17 August 2003 00:44, Steffen Barszus wrote: Am Sonntag, 17. August 2003 00:23 schrieb Steffen Barszus: [:snip a lot:] else unset PPP_TEMP_ENTRY fi Are there cases there a dynamic DNS don't want to be used ? which ? From what I have read on the net, if the option usepeerdns is used the variable USEPEERDNS is set, so this could be used, am I right ? right. to answer your question about dynamic DNS I think that pppd can be used for weird thing, such a a pppd tunnel over ssh. example : http://www.linux.org/docs/ldp/howto/mini/VPN.html i have also seen that some people use alternative DNS in order to access some non standard domain, such as http://www.name-space.com/ and, i may want to use my own dns servers, for security, for example ( dns sec ). all of these would requires to not use the option usepeerdns, so, i guess you are right. In order to work on a real script, i propose to use the wiki to write the files : http://qa.mandrakesoft.com/twiki/bin/edit/Main/DraftPppScript By the way, i have put ppp maintener in Cc, please use answer to all, thanks :) and, for completeness, i have take a look at /etc/ppp/ipup on debian, it only contains the runparts line of the proposal i have made. -- Mickaël Scherer
Re: [Cooker] dynamic DNS and /etc/ppp/ip-up (need to be rethinked ?)
On Saturday 16 August 2003 18:35, Olivier Blin wrote: Hi, I've found some weird things in /etc/ppp/ip-up 1) what's this trick for PPP_TEMP_ENTRY ? # for dynamic DNS support with gnome-ppp and kppp and draknet if grep -i '#.*ppp temp entry' /etc/resolv.conf /dev/null ; then PPP_TEMP_ENTRY=`grep '#.*ppp temp entry' /etc/resolv.conf | \ tail -1 | sed 's/.*ppp temp entry/# ppp temp entry/' ` else unset PPP_TEMP_ENTRY fi Why use this grep | tail | sed ? The result should always be # ppp temp entry 2) kppp now writes temp entries in /etc/resolv.conf after /etc/ppp/ip-up is run, gnome-ppp isn't supported anymore, and drakconnect uses kppp (it even run it as root ...), so there is no need to check for #.*ppp temp entry here ... grep -i '#.*ppp temp entry' /etc/resolv.conf will never match here. So PPP_TEMP_ENTRY will never be set. 3) Since PPP_TEMP_ENTRY is always unset, the script never writes DNS in /etc/resolv.conf This is a problem when pppd or wvdial are used to establish the connection. if [ -n $PPP_TEMP_ENTRY ]; then [ -n $DNS1 ] \ echo -e nameserver $DNS1 $PPP_TEMP_ENTRY /etc/resolv.conf [ -n $DNS2 ] \ echo -e nameserver $DNS2 $PPP_TEMP_ENTRY /etc/resolv.conf fi I propose to drop all this if grep -i '#.*ppp temp entry' /etc/resolv.conf and if [ -n $PPP_TEMP_ENTRY ] blocks and to replace them with : PPP_TEMP_ENTRY=# ppp temp entry [ -n $DNS1 ] \ echo -e nameserver $DNS1 $PPP_TEMP_ENTRY /etc/resolv.conf [ -n $DNS2 ] \ echo -e nameserver $DNS2 $PPP_TEMP_ENTRY /etc/resolv.conf Have I missed something ? For dialup users, with the current ip-up script, only kppp sets dynamic DNS in /etc/resolv.conf (it doesn't use the ip-up to do that) I would also add something to replace if-up.local [ -x /etc/ppp/ip-up.local ] /etc/ppp/ip-up.local $@ replaced by if [ -d /etc/ppp/ifup-ppp.d -a -x /usr/bin/run-parts ]; then /usr/bin/run-parts --arg $@ /etc/ppp/ipup.d/ fi then just drop a script to call /etc/ppp/ipup.local in /etc/ppp/ipup-ppp.d, for backward compatibility. the same applis for ipdown.local . This would also mean we can remove the piece of code to flush sendmail queue, and put it in a separate script, to be cleaner. the second problem i see is that each file dropped in /etc/sysconfig/network-scripts/ifup.d/, are not executed with pppd. to give a small example ( and the only one i see ), wshaperx does not work out of the box, on a adsl connection. it seems that this line : [ -f /etc/sysconfig/network-scripts/ifcfg-${LOGDEVICE} ] /etc/sysconfig/network-scripts/ifup-post ifcfg-${LOGDEVICE} never call ifup-post, because $LOGDEVICE is always unset. at least for adsl and RTC connection. I know that it also handle ppp connection for Isdn and maybe for tunnel, so this line is maybe for this kind of connection. removing this line and dropping a script in /etc/ppp/ipup.d/ could be a solution. I think this solution can be more flexible than the current one. did i forget someting ? is it possible to replace the script in the current package ? -- Michaël Scherer
Re: [Cooker] dynamic DNS and /etc/ppp/ip-up (need to be rethinked ?)
Am Samstag, 16. August 2003 18:35 schrieb Olivier Blin: Hi, I've found some weird things in /etc/ppp/ip-up 1) what's this trick for PPP_TEMP_ENTRY ? # for dynamic DNS support with gnome-ppp and kppp and draknet if grep -i '#.*ppp temp entry' /etc/resolv.conf /dev/null ; then PPP_TEMP_ENTRY=`grep '#.*ppp temp entry' /etc/resolv.conf | \ tail -1 | sed 's/.*ppp temp entry/# ppp temp entry/' ` else unset PPP_TEMP_ENTRY fi Why use this grep | tail | sed ? The result should always be # ppp temp entry well , dunno 2) kppp now writes temp entries in /etc/resolv.conf after /etc/ppp/ip-up is run, gnome-ppp isn't supported anymore, and drakconnect uses kppp (it even run it as root ...), so there is no need to check for #.*ppp temp entry here ... grep -i '#.*ppp temp entry' /etc/resolv.conf will never match here. So PPP_TEMP_ENTRY will never be set. If kppp does it and PPP_TEMP_ENTRY is not set, isn't it right ? Otherwise the nameservers would be written two times in there, wouldn't it ? Why do you think it will never match ? because the # ppp temp entry is not set in this case ? 3) Since PPP_TEMP_ENTRY is always unset, the script never writes DNS in /etc/resolv.conf This is a problem when pppd or wvdial are used to establish the connection. if [ -n $PPP_TEMP_ENTRY ]; then [ -n $DNS1 ] \ echo -e nameserver $DNS1 $PPP_TEMP_ENTRY /etc/resolv.conf [ -n $DNS2 ] \ echo -e nameserver $DNS2 $PPP_TEMP_ENTRY /etc/resolv.conf fi true I propose to drop all this if grep -i '#.*ppp temp entry' /etc/resolv.conf and if [ -n $PPP_TEMP_ENTRY ] blocks and to replace them with : PPP_TEMP_ENTRY=# ppp temp entry [ -n $DNS1 ] \ echo -e nameserver $DNS1 $PPP_TEMP_ENTRY /etc/resolv.conf [ -n $DNS2 ] \ echo -e nameserver $DNS2 $PPP_TEMP_ENTRY /etc/resolv.conf Have I missed something ? For dialup users, with the current ip-up script, only kppp sets dynamic DNS in /etc/resolv.conf (it doesn't use the ip-up to do that) ... Hmmm Your complain is that for modem use only kppp works ? If drakconnect sets this entry normally in /etc/resolv.conf and doesn't do that for modem since it is supposed to work with kppp it is sure a bug. I have a bit the feeling I don't understand what you want to say, but thats Ok I guess ;) Steffen
Re: [Cooker] dynamic DNS and /etc/ppp/ip-up (need to be rethinked ?)
Am Samstag, 16. August 2003 19:52 schrieb Michael Scherer: On Saturday 16 August 2003 18:35, Olivier Blin wrote: Have I missed something ? For dialup users, with the current ip-up script, only kppp sets dynamic DNS in /etc/resolv.conf (it doesn't use the ip-up to do that) I would also add something to replace if-up.local [ -x /etc/ppp/ip-up.local ] /etc/ppp/ip-up.local $@ replaced by if [ -d /etc/ppp/ifup-ppp.d -a -x /usr/bin/run-parts ]; then /usr/bin/run-parts --arg $@ /etc/ppp/ipup.d/ fi then just drop a script to call /etc/ppp/ipup.local in /etc/ppp/ipup-ppp.d, for backward compatibility. the same applis for ipdown.local . absolutly agree with that :) This would also mean we can remove the piece of code to flush sendmail queue, and put it in a separate script, to be cleaner. Yep and it would enable packages to put scripts in there to be executed after dial-up. the second problem i see is that each file dropped in /etc/sysconfig/network-scripts/ifup.d/, are not executed with pppd. to give a small example ( and the only one i see ), wshaperx does not work out of the box, on a adsl connection. it seems that this line : [ -f /etc/sysconfig/network-scripts/ifcfg-${LOGDEVICE} ] /etc/sysconfig/network-scripts/ifup-post ifcfg-${LOGDEVICE} never call ifup-post, because $LOGDEVICE is always unset. at least for adsl and RTC connection. I know that it also handle ppp connection for Isdn and maybe for tunnel, so this line is maybe for this kind of connection. removing this line and dropping a script in /etc/ppp/ipup.d/ could be a solution. I think this solution can be more flexible than the current one. did i forget someting ? is it possible to replace the script in the current package ? Would be nice Steffen
Re: [Cooker] dynamic DNS and /etc/ppp/ip-up (need to be rethinked?)
If kppp does it and PPP_TEMP_ENTRY is not set, isn't it right ? kppp doesn't use /etc/ppp/ip-up to write dynamic DNS entries in /etc/resolv.conf Otherwise the nameservers would be written two times in there, wouldn't it ? Yes, because kppp sets itself the dynamic DNS entries and ip-up *never* sets this dynamic DNS entries, while it should be its job, not kppp's. Why do you think it will never match ? because the # ppp temp entry is not set in this case ? Because when connection is closed, /etc/ppp/ip-down removes all lines matching# ppp temp entry. What I wanted to point out it that PPP_TEMP_ENTRY variable is never set, so there no need to use it ... For dialup users, with the current ip-up script, only kppp sets dynamic DNS in /etc/resolv.conf (it doesn't use the ip-up to do that) ... Hmmm Your complain is that for modem use only kppp works ? Roughly speaking, yes. My real complain is that for dialup modem use, only kppp sets dynamic DNS correctly, but it doesn't use ip-up to set them, though I don't know how kppp does it (perhaps it uses /etc/peers/resolv.conf) When others dialers (ppp-on, wvdial) are used, dynamic DNS aren't used, ip-up doesn't write the DNS in /etc/resolv.conf while it should (see my proposed fix) If drakconnect sets this entry normally in /etc/resolv.conf and doesn't do that for modem since it is supposed to work with kppp it is sure a bug. It seems that drakconnect use kppp, when I try to connect with drakconnect, I launchs kppp as root. It's /etc/ppp/ip-up 's job to set the dynamic DNS entries in /etc/resolv.conf, but it is never done because PPP_TEMP_ENTRY is never set. I have a bit the feeling I don't understand what you want to say, but thats Ok I guess ;) Sorry, it's a bit hard to explain ;) -- Olivier Blin
Re: [Cooker] dynamic DNS and /etc/ppp/ip-up (need to be rethinked ?)
Am Samstag, 16. August 2003 22:31 schrieb Olivier Blin: If kppp does it and PPP_TEMP_ENTRY is not set, isn't it right ? kppp doesn't use /etc/ppp/ip-up to write dynamic DNS entries in /etc/resolv.conf never used kppp Otherwise the nameservers would be written two times in there, wouldn't it ? Yes, because kppp sets itself the dynamic DNS entries and ip-up *never* sets this dynamic DNS entries, while it should be its job, not kppp's. agree Why do you think it will never match ? because the # ppp temp entry is not set in this case ? Because when connection is closed, /etc/ppp/ip-down removes all lines matching# ppp temp entry. What I wanted to point out it that PPP_TEMP_ENTRY variable is never set, so there no need to use it ... Hmm I don't think that you are right. What you are talking of is the following from /etc/ppp/ip-down: awk '{if(!/nameserver .* # ppp temp entry.*/) print $0}' /etc/resolv.conf That means that all lines nameserver ... # ppp temp entry are deleted. The rule is not applied to a line there only # ppp temp entry is in. That means the DNS are written in /etc/resolv.conf if # ppp temp entry is in /etc/resolv.conf For dialup users, with the current ip-up script, only kppp sets dynamic DNS in /etc/resolv.conf (it doesn't use the ip-up to do that) ... Hmmm Your complain is that for modem use only kppp works ? Roughly speaking, yes. My real complain is that for dialup modem use, only kppp sets dynamic DNS correctly, but it doesn't use ip-up to set them, though I don't know how kppp does it (perhaps it uses /etc/peers/resolv.conf) When others dialers (ppp-on, wvdial) are used, dynamic DNS aren't used, ip-up doesn't write the DNS in /etc/resolv.conf while it should (see my proposed fix) Try writing a line # ppp temp entry in /etc/resolv.conf . Then ip-up should write the dynamic nameserver in /etc/resolv.conf If drakconnect sets this entry normally in /etc/resolv.conf and doesn't do that for modem since it is supposed to work with kppp it is sure a bug. It seems that drakconnect use kppp, when I try to connect with drakconnect, I launchs kppp as root. It's /etc/ppp/ip-up 's job to set the dynamic DNS entries in /etc/resolv.conf, but it is never done because PPP_TEMP_ENTRY is never set. Well disagree, see above. At least thats what I read from the code. I have a bit the feeling I don't understand what you want to say, but thats Ok I guess ;) Sorry, it's a bit hard to explain ;) Well I must admit that under 9.1 I doesn't get written the temporary DNS to /etc/resolv.conf . But under 9.2b1 it is working as explained above. If you wish I can fully pots ip-up /ip-down and explain what I think what happens. Steffen
Re: [Cooker] dynamic DNS and /etc/ppp/ip-up (need to be rethinked?)
That means that all lines nameserver ... # ppp temp entry are deleted. The rule is not applied to a line there only # ppp temp entry is in. That means the DNS are written in /etc/resolv.conf if # ppp temp entry is in /etc/resolv.conf [snip] Try writing a line # ppp temp entry in /etc/resolv.conf . Then ip-up should write the dynamic nameserver in /etc/resolv.conf I already know this trick, but the user shouldn't have to do this !! Why should we write # ppp temp entry in /etc/resolv.conf to get it to work ? This doesn't work out of the box ! And the user don't have to reverse ingeneer scripts ... If you wish I can fully pots ip-up /ip-down and explain what I think what happens. Yes, that would help me :) -- Olivier Blin
Re: [Cooker] dynamic DNS and /etc/ppp/ip-up (need to be rethinked ?)
Am Samstag, 16. August 2003 23:50 schrieb Olivier Blin: That means that all lines nameserver ... # ppp temp entry are deleted. The rule is not applied to a line there only # ppp temp entry is in. That means the DNS are written in /etc/resolv.conf if # ppp temp entry is in /etc/resolv.conf [snip] Try writing a line # ppp temp entry in /etc/resolv.conf . Then ip-up should write the dynamic nameserver in /etc/resolv.conf I already know this trick, but the user shouldn't have to do this !! Why should we write # ppp temp entry in /etc/resolv.conf to get it to work ? This doesn't work out of the box ! And the user don't have to reverse ingeneer scripts ... No he shouldn't. drakconnect should put it in /etc/resolv.conf, but I must admit that I don't see a case where it wouldn't be usefull If you wish I can fully pots ip-up /ip-down and explain what I think what happens. s/pots/post/ Yes, that would help me :) Well I guess it isn't need anymore, since your point it should be allways done, not only if # ppp temp entry is in /etc/resolv.conf. I would basically say that you want that drakconnect does write this line for modem too in /etc/resolv.conf Ok , here we go #!/bin/bash # This file should not be modified -- make local changes to # /etc/ppp/ip-up.local instead here as supposed, an /etc/ppp/ip-up.d/ dir would be nice and more clean. PATH=/sbin:/usr/sbin:/bin:/usr/bin export PATH LOGDEVICE=$6 Where is this documented ? I haven't found anything about it. REALDEVICE=$1 export PATH=/sbin:/usr/sbin:/bin:/usr/bin if [ -x /usr/sbin/sendmail ];then /usr/sbin/sendmail -q 2/dev/null /dev/null fi === /etc/ppp/ip-up.d/ # for dynamic DNS support with gnome-ppp and kppp and draknet if grep -i '#.*ppp temp entry' /etc/resolv.conf /dev/null ; then If there is a line containing # ppp temp entry PPP_TEMP_ENTRY=`grep '#.*ppp temp entry' /etc/resolv.conf | \ tail -1 | sed 's/.*ppp temp entry/# ppp temp entry/' ` PPP_TEMP_ENTRY=# ppp temp entry, written in a style that it could win the most useless use of sed award. else unset PPP_TEMP_ENTRY fi if [ -n $PPP_TEMP_ENTRY ]; then [ -n $DNS1 ] \ echo -e nameserver $DNS1 $PPP_TEMP_ENTRY /etc/resolv.conf [ -n $DNS2 ] \ echo -e nameserver $DNS2 $PPP_TEMP_ENTRY /etc/resolv.conf fi [ -f /etc/sysconfig/network-scripts/ifcfg-${LOGDEVICE} ] /etc/sysconfig/network-scripts/ifup-post ifcfg-${LOGDEVICE} [ -x /etc/ppp/ip-up.local ] /etc/ppp/ip-up.local $@ exit 0
Re: [Cooker] dynamic DNS and /etc/ppp/ip-up (need to be rethinked?)
No he shouldn't. drakconnect should put it in /etc/resolv.conf, but I must admit that I don't see a case where it wouldn't be usefull Sorry, but I don't want to use drakconnect, it uses kppp ... I want to use wvdial and I don't understand why there should be a line # ppp temp entry in /etc/resolv.conf # for dynamic DNS support with gnome-ppp and kppp and draknet if grep -i '#.*ppp temp entry' /etc/resolv.conf /dev/null ; then If there is a line containing # ppp temp entry Ok, but why to do this ? When should this happen ? kppp writes /etc/resolv.conf after /etc/ppp/ip-up is run and I guess it deletes its entries before /etc/ppp/ip-down is run. I don't know any other soft that writes # ppp temp entry entries. PPP_TEMP_ENTRY=`grep '#.*ppp temp entry' /etc/resolv.conf | \ tail -1 | sed 's/.*ppp temp entry/# ppp temp entry/' ` PPP_TEMP_ENTRY=# ppp temp entry, written in a style that it could win the most useless use of sed award. agree :) Thanks for your help. -- Olivier Blin
Re: [Cooker] dynamic DNS and /etc/ppp/ip-up (need to be rethinked ?)
Am Sonntag, 17. August 2003 00:23 schrieb Steffen Barszus: Well I know its bad style, but I pressed accidently on send :D Ok , here we go #!/bin/bash # This file should not be modified -- make local changes to # /etc/ppp/ip-up.local instead here as supposed, an /etc/ppp/ip-up.d/ dir would be nice and more clean. PATH=/sbin:/usr/sbin:/bin:/usr/bin export PATH LOGDEVICE=$6 Where is this documented ? I haven't found anything about it. REALDEVICE=$1 export PATH=/sbin:/usr/sbin:/bin:/usr/bin if [ -x /usr/sbin/sendmail ];then /usr/sbin/sendmail -q 2/dev/null /dev/null fi === /etc/ppp/ip-up.d/ # for dynamic DNS support with gnome-ppp and kppp and draknet if grep -i '#.*ppp temp entry' /etc/resolv.conf /dev/null ; then If there is a line containing # ppp temp entry PPP_TEMP_ENTRY=`grep '#.*ppp temp entry' /etc/resolv.conf | \ tail -1 | sed 's/.*ppp temp entry/# ppp temp entry/' ` PPP_TEMP_ENTRY=# ppp temp entry, written in a style that it could win the most useless use of sed award. It doesn't make more then what I said in any case, so take the sed, the obsolete tail -1 and the grep out and ready. else unset PPP_TEMP_ENTRY fi Are there cases there a dynamic DNS don't want to be used ? which ? From what I have read on the net, if the option usepeerdns is used the variable USEPEERDNS is set, so this could be used, am I right ? if [ -n $PPP_TEMP_ENTRY ]; then [ -n $DNS1 ] \ echo -e nameserver $DNS1 $PPP_TEMP_ENTRY /etc/resolv.conf [ -n $DNS2 ] \ echo -e nameserver $DNS2 $PPP_TEMP_ENTRY /etc/resolv.conf fi [ -f /etc/sysconfig/network-scripts/ifcfg-${LOGDEVICE} ] /etc/sysconfig/network-scripts/ifup-post ifcfg-${LOGDEVICE} [ -x /etc/ppp/ip-up.local ] /etc/ppp/ip-up.local $@ exit 0 And the ip-down #!/bin/bash [.. snip ...] mv -f /etc/resolv.conf /etc/resolv.conf.tmp cat /etc/resolv.conf.tmp | awk '{if(!/nameserver .* # ppp temp entry.*/) print $0}' /etc/resolv.conf -- print all lines that does not contain the pattern nameserver ... # ppp temp entry to /etc/resolv.conf chmod 0644 /etc/resolv.conf -- shouldn't using cp instead of mv preserve the rights of /etc/resolv.conf ? snip Hope that wasn't posted to confusing ;) Steffen
Re: [Cooker] dynamic DNS and /etc/ppp/ip-up (need to be rethinked ?)
Am Sonntag, 17. August 2003 00:42 schrieb Olivier Blin: No he shouldn't. drakconnect should put it in /etc/resolv.conf, but I must admit that I don't see a case where it wouldn't be usefull Sorry, but I don't want to use drakconnect, it uses kppp ... I want to use wvdial and I don't understand why there should be a line # ppp temp entry in /etc/resolv.conf net_monitor uses kppp for modem. # for dynamic DNS support with gnome-ppp and kppp and draknet if grep -i '#.*ppp temp entry' /etc/resolv.conf /dev/null ; then If there is a line containing # ppp temp entry Ok, but why to do this ? When should this happen ? kppp writes /etc/resolv.conf after /etc/ppp/ip-up is run and I guess it deletes its entries before /etc/ppp/ip-down is run. I don't know any other soft that writes # ppp temp entry entries. Yep. I just wanted to say that you are not right that it doesn't work currently. After digging trough the script I agree that it is solved suboptimal. If , when the option usepeerdns is set, USEPEERDNS is set, that should be used to prove if the DNS should be written to /etc/resolv.conf. The current way breaks config by hand. PPP_TEMP_ENTRY=`grep '#.*ppp temp entry' /etc/resolv.conf | \ tail -1 | sed 's/.*ppp temp entry/# ppp temp entry/' ` PPP_TEMP_ENTRY=# ppp temp entry, written in a style that it could win the most useless use of sed award. agree :) Thanks for your help.
Re: [Cooker] dynamic DNS and /etc/ppp/ip-up (need to be rethinked?)
PPP_TEMP_ENTRY=`grep '#.*ppp temp entry' /etc/resolv.conf | \ tail -1 | sed 's/.*ppp temp entry/# ppp temp entry/' ` PPP_TEMP_ENTRY=# ppp temp entry, written in a style that it could win the most useless use of sed award. It doesn't make more then what I said in any case, so take the sed, the obsolete tail -1 and the grep out and ready. agree one more time :) else unset PPP_TEMP_ENTRY fi Are there cases there a dynamic DNS don't want to be used ? which ? From what I have read on the net, if the option usepeerdns is used the variable USEPEERDNS is set, so this could be used, am I right ? According pppd man : The addresses supplied by the peer (if any) are passed to the /etc/ppp/ip-up script in the environment variables DNS1 and DNS2. So why not use DNS1 and DNS2 variables as my original proposal does ? And the ip-down [.. snip ...] mv -f /etc/resolv.conf /etc/resolv.conf.tmp cat /etc/resolv.conf.tmp | awk '{if(!/nameserver .* # ppp temp entry.*/) print $0}' /etc/resolv.conf -- print all lines that does not contain the pattern nameserver ... # ppp temp entry to /etc/resolv.conf But why keep the # ppp temp entry lines ? Why not use if(!/.*# ppp temp entry.*/) print $0} and remove the irrelevant stuff in /etc/ppp/ip-up ? chmod 0644 /etc/resolv.conf -- shouldn't using cp instead of mv preserve the rights of /etc/resolv.conf ? right :) Hope that wasn't posted to confusing ;) no, that's ok :) -- Olivier Blin
Re: [Cooker] dynamic DNS and /etc/ppp/ip-up (need to be rethinked?)
Sorry, but I don't want to use drakconnect, it uses kppp ... I want to use wvdial and I don't understand why there should be a line# ppp temp entry in /etc/resolv.conf net_monitor uses kppp for modem. But I don't want to use something that uses kppp, it's overkill. I want to use a simple command line program such as wvdial. Ok, but why to do this ? When should this happen ? kppp writes /etc/resolv.conf after /etc/ppp/ip-up is run and I guess it deletes its entries before /etc/ppp/ip-down is run. I don't know any other soft that writes # ppp temp entry entries. Yep. I just wanted to say that you are not right that it doesn't work currently. I don't agree, I have no # ppp temp entry in /etc/resolv.conf after Mandrake installation. If I use wvdial to connect, that won't work. It works currently only with something that uses kppp. Try with wvdial, it's very simple to configure. After digging trough the script I agree that it is solved suboptimal. If , when the option usepeerdns is set, USEPEERDNS is set, that should be used to prove if the DNS should be written to /etc/resolv.conf. The current way breaks config by hand. Yes, it breaks config by hand, so I'm right that it doesn't work currently ;) Quite good solution. You would use something like this : if [ -n $USERPEERDNS ]; then [ -n $DNS1 ] \ echo -e nameserver $DNS1 $PPP_TEMP_ENTRY /etc/resolv.conf [ -n $DNS2 ] \ echo -e nameserver $DNS2 $PPP_TEMP_ENTRY /etc/resolv.conf fi But USEPEERDNS test isn't needed IMHO. If it isn't set, DNS1 and DNS2 aren't set. Though USEPEERDNS makes the script easier to understand :) -- Olivier Blin
Re: [Cooker] dynamic DNS and /etc/ppp/ip-up (need to be rethinked ?)
Am Sonntag, 17. August 2003 01:06 schrieb Olivier Blin: Sorry, but I don't want to use drakconnect, it uses kppp ... I want to use wvdial and I don't understand why there should be a line# ppp temp entry in /etc/resolv.conf net_monitor uses kppp for modem. But I don't want to use something that uses kppp, it's overkill. I want to use a simple command line program such as wvdial. Ok, but why to do this ? When should this happen ? kppp writes /etc/resolv.conf after /etc/ppp/ip-up is run and I guess it deletes its entries before /etc/ppp/ip-down is run. I don't know any other soft that writes # ppp temp entry entries. Yep. I just wanted to say that you are not right that it doesn't work currently. I don't agree, I have no # ppp temp entry in /etc/resolv.conf after Mandrake installation. If I use wvdial to connect, that won't work. It works currently only with something that uses kppp. Try with wvdial, it's very simple to configure. After digging trough the script I agree that it is solved suboptimal. If , when the option usepeerdns is set, USEPEERDNS is set, that should be used to prove if the DNS should be written to /etc/resolv.conf. The current way breaks config by hand. Yes, it breaks config by hand, so I'm right that it doesn't work currently ;) Quite good solution. You would use something like this : if [ -n $USERPEERDNS ]; then [ -n $DNS1 ] \ echo -e nameserver $DNS1 $PPP_TEMP_ENTRY /etc/resolv.conf [ -n $DNS2 ] \ echo -e nameserver $DNS2 $PPP_TEMP_ENTRY /etc/resolv.conf fi But USEPEERDNS test isn't needed IMHO. If it isn't set, DNS1 and DNS2 aren't set. Though USEPEERDNS makes the script easier to understand :) Yep you are right, it isn't needed. Now we need: someone in charge to change it ;) Further: Is $6 allways used ? ipparam string Provides an extra parameter to the ip-up and ip-down scripts. If this option is given, the string supplied is given as the 6th parameter to those scripts. Would it be good to obsolete ip-up.local and use ip-up.d/somescripts instead ? pro: - it is more clear what it does, instead /etc/sysconfig/network-scripts/if-up.d - it is sure that it gets executed, not depending on ipparam contra: - /etc/sysconfig/network-scripts/if-up.d has the same purpose, if it is working allways Steffen
Re: [Cooker] dynamic DNS and /etc/ppp/ip-up (need to be rethinked ?)
Le Samedi 16 Août 2003 21:05, Steffen Barszus a écrit : Am Samstag, 16. August 2003 19:52 schrieb Michael Scherer: On Saturday 16 August 2003 18:35, Olivier Blin wrote: Have I missed something ? For dialup users, with the current ip-up script, only kppp sets dynamic DNS in /etc/resolv.conf (it doesn't use the ip-up to do that) I would also add something to replace if-up.local [ -x /etc/ppp/ip-up.local ] /etc/ppp/ip-up.local $@ replaced by if [ -d /etc/ppp/ifup-ppp.d -a -x /usr/bin/run-parts ]; then /usr/bin/run-parts --arg $@ /etc/ppp/ipup.d/ fi then just drop a script to call /etc/ppp/ipup.local in /etc/ppp/ipup-ppp.d, for backward compatibility. the same applis for ipdown.local . absolutly agree with that :) I agree also, but I have a wish : All this configuration files are called by scripts and programs. Some of them are updated by other scripts and programs. Other are deprecated and are replaced by ??? Can you put a little comment in these config files such as : # used by ... # updated by ... # deprecated : use instead ... (ex: /etc/networks) People who use Debian, Slackware, LFS... are lost when they see a Mandrake because they fight against MCC. IMHO, few comments can improve the comprehension of Mdk's architecture. With Mdk 9.1, I found a bug in adsl connection due to this file with imbedded blanks making an error in /etc/ppp/pppoe.conf . The file is /etc/sysconfig/network-scripts/ifcfg-eth0\ \(using\ module\ bcm4400\) NB: No problem with the same card as eth1 - ifcfg-eth1 It was difficult to understand the problem starting from init. I hope you can understand my wish ! -- Pierre Jarillon - http://pjarillon.free.fr/ Vice-président de l'ABUL : http://abul.org/