On Monday 01 Mar 2010 16:59:19 David Paleino wrote:
> 
> Ok, maybe I didn't explain myself clearly enough :).
> Don't put any whitespace in those fields; they're supposed to executed ONE
> command, with no arguments.
> Try making a vpnc-wicd-postconnect.sh and vpnc-wicd-postdisconnect.sh, and
>  see if those work. Yes, I agree we should make it safer, and document the
>  whole thing better. And maybe find a better solution for you ;)
>

Thanks. I tried it now the way you explained. Unfortunately, I still see the 
problem. Just in a different way.

It seems to be the problem with the pre-disconnect script setting that wicd 
provides. If I add a script there (~/bin/vpnc-disconnect.sh) and initiate a 
connect,  wcid triggers the disconnect script but never returns.

Now there could be many things there.

Suppose I am connected to my home network and then am initiating a connect, 
while my vpn is not connected, a vpnc-disconnect is requested. This should 
result in vpnc-disconnect exiting with an error code. But still, wicd should 
not be bothered about that.
In this case, it looks like wicd executed the pre-disconnect script and then 
went haywire.

Once the pre-disconnect script is removed, wicd works good. So, the problem 
could be specifically with the pre-disconnect part given that post-connect 
seems to be working properly.


And yes, all this information should be a good candidate for the README.Debian 
file.

> > I also discovered some more problems. I populated the an ESSID with
> >  pre/post script details. Later, I removed the Pre-XX setting. But on
> >  re-looking at the window I could see the same value back. The setting
> >  wasn't being removed at all. I had to go and edit the setting in the
> >  /etc/wicd/wireless-settings.conf file ultimately.
> 
> This is a separate bug, please file a new one, and we'll investigate that
>  too.
>
No.  Couldn't reproduce it. Will see it later.
 
> I don't consider wicd a "core package" -- I consider it rather young to be
> "core", but I'm sure you're not the only one considering it so :)
>

Yes, especially after the whole fiasco of network manager in trying to solve a 
simple problem, "network management" 

I still would request you to give it a personal consideration as a core 
package especially given that it serves a "core service".

> Unfortunately, the scripting mechanism is barely documented, and I agree
>  this is an important bug to be solved ASAP. I'm sorry it doesn't just work
>  out-of- the-box for you; but maybe it's just a misunderstanding of you,
>  plus a heavy lack of documentation.
>

IMO yes. wicd is simple and small and that is its biggest strength. It doesn't 
need a wicd-vpnc wicd-openvpn ..... to just do basic tasks.

The scripting mechanism is important because this gives users the great 
flexibility to do additional network  management. I think the upstream should 
just spend a little more time on it and make it robust.

> See:
> 
> $ cat foo.py
> from wicd.misc import ExecuteScript
> 
> ExecuteScript("/bin/echo foo", True)
> ExecuteScript("whoami", True)
> $ python foo.py
> Executing '/bin/echo foo' with params
> '/bin/echo foo' returned 127
> Executing whoami with params
> whoami returned 0
> $
> 

Hmmm!! The same ExecuteScript is called in both pre/post script execution.

I think you might want to look a little at the pre-disconnection part. I am 
attaching the logs.

It could be that vpnc-disconnect.sh is executed while there is no vpn 
connection, but still it should proceed with network connection, which is not 
the case.


> Regarding your original bug: I forgot to say that all this could be
>  avoided, just by dropping "sudo".. scripts are executed by the user
>  running the daemon, i.e. root. However, it's been useful to investigate
>  how scripts work a bit better :)
> 
> If you still have problems, after dropping "sudo" from your original
>  command, or after passing just ONE script, with no arguments, in the given
>  fields, then this really is a weird serious bug. But I hope/think this
>  will not be the case
> 

I think it is a real bug in there. Thank you for your work.

Regards,
Ritesh
-- 
Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."
2010/03/01 20:54:06 :: found usedhcphostname in configuration False             
                               
2010/03/01 20:54:06 :: found predisconnectscript in configuration 
/home/rrs/bin/vpnc-disconnect.sh             
2010/03/01 20:54:06 :: found enctype in configuration wpa                       
                               
2010/03/01 20:54:06 :: found dns3 in configuration None                         
                               
2010/03/01 20:54:06 :: found dns2 in configuration None                         
                               
2010/03/01 20:54:06 :: found search_domain in configuration None                
                               
2010/03/01 20:54:06 :: found use_settings_globally in configuration False       
                               
2010/03/01 20:54:06 :: found use_static_dns in configuration False              
                               
2010/03/01 20:54:06 :: found automatic in configuration True                    
                               
2010/03/01 20:54:06 :: found dns1 in configuration None                         
                               
2010/03/01 20:54:06 :: rrs has profile                                          
                               
2010/03/01 20:54:06 :: trying to automatically connect to...rrs                 
                               
2010/03/01 20:54:06 :: Connecting to wireless network rrs                       
                               
2010/03/01 20:54:06 :: iwconfig wlan0                                           
                               
2010/03/01 20:54:06 :: Running pre-disconnect script                            
                               
2010/03/01 20:54:06 :: found netprop_width in configuration 484                 
                               
2010/03/01 20:54:06 :: found netprop_height in configuration 600                
                               
2010/03/01 20:54:06 :: found netprop_width in configuration 484                 
                               
2010/03/01 20:54:06 :: found netprop_height in configuration 600                
                               
2010/03/01 20:54:06 :: found netprop_width in configuration 484                 
                               
2010/03/01 20:54:06 :: found netprop_height in configuration 600                
                               
2010/03/01 20:54:06 :: found netprop_width in configuration 484                 
                               
2010/03/01 20:54:06 :: found netprop_height in configuration 600                
                               
2010/03/01 20:54:06 :: found netprop_width in configuration 484                 
                               
2010/03/01 20:54:06 :: found netprop_height in configuration 600                
                               
2010/03/01 20:54:06 :: found netprop_width in configuration 484                 
                               
2010/03/01 20:54:06 :: found netprop_height in configuration 600                
                               
2010/03/01 20:54:06 :: found netprop_width in configuration 484                 
                               
2010/03/01 20:54:06 :: found netprop_height in configuration 600                
                               
2010/03/01 20:54:06 :: found netprop_width in configuration 484                 
                               
2010/03/01 20:54:06 :: found netprop_height in configuration 600                
                               
2010/03/01 20:54:06 :: found netprop_width in configuration 484                 
                               
2010/03/01 20:54:06 :: found netprop_height in configuration 600                
                               
2010/03/01 20:54:06 :: found netprop_width in configuration 484                 
                               
2010/03/01 20:54:06 :: found netprop_height in configuration 600                
                               
2010/03/01 20:54:06 :: found netprop_width in configuration 484                 
                               
2010/03/01 20:54:06 :: found netprop_height in configuration 600                
                               
2010/03/01 20:54:08 :: ifconfig eth0                                            
                               
2010/03/01 20:54:08 :: ifconfig wlan0                                           
                               
2010/03/01 20:54:13 :: ifconfig eth0                                            
                               
2010/03/01 20:54:13 :: ifconfig wlan0                                           
                               
2010/03/01 20:54:18 :: ifconfig eth0                                            
                               
2010/03/01 20:54:18 :: ifconfig wlan0                                           
                               
2010/03/01 20:54:23 :: ifconfig eth0                                            
                               
2010/03/01 20:54:23 :: ifconfig wlan0                                           
                               
2010/03/01 20:54:28 :: ifconfig eth0                                            
                               
2010/03/01 20:54:28 :: ifconfig wlan0
2010/03/01 20:54:33 :: ifconfig eth0
2010/03/01 20:54:33 :: ifconfig wlan0
2010/03/01 20:54:38 :: ifconfig eth0
2010/03/01 20:54:38 :: ifconfig wlan0
2010/03/01 20:54:39 :: Connecting to wireless network rrs
2010/03/01 20:54:39 :: iwconfig wlan0
2010/03/01 20:54:39 :: Running pre-disconnect script
2010/03/01 20:54:41 :: ifconfig eth0
2010/03/01 20:54:41 :: ifconfig wlan0
2010/03/01 20:54:45 :: ifconfig eth0
2010/03/01 20:54:45 :: ifconfig wlan0
2010/03/01 20:54:49 :: ifconfig eth0
2010/03/01 20:54:49 :: ifconfig wlan0
2010/03/01 20:54:53 :: ifconfig eth0
2010/03/01 20:54:53 :: ifconfig wlan0
2010/03/01 20:54:57 :: ifconfig eth0
2010/03/01 20:54:57 :: ifconfig wlan0
2010/03/01 20:55:01 :: ifconfig eth0
2010/03/01 20:55:01 :: ifconfig wlan0
2010/03/01 20:55:05 :: ifconfig eth0
2010/03/01 20:55:05 :: ifconfig wlan0






2010/03/01 20:55:29 :: ifconfig eth0                                            
                               
2010/03/01 20:55:29 :: ifconfig wlan0                                           
                               
2010/03/01 20:55:37 :: ifconfig eth0                                            
                               
2010/03/01 20:55:37 :: ifconfig wlan0                                           
                               
2010/03/01 20:55:37 :: found afterscript in configuration 
/home/rrs/bin/vpnc-connect.sh                        
2010/03/01 20:55:37 :: found postdisconnectscript in configuration None         
                               
2010/03/01 20:55:37 :: found beforescript in configuration None                 
                               
2010/03/01 20:55:37 :: found predisconnectscript in configuration None          
                               
2010/03/01 20:55:41 :: found afterscript in configuration 
/home/rrs/bin/vpnc-connect.sh                        
2010/03/01 20:55:41 :: found postdisconnectscript in configuration None         
                               
2010/03/01 20:55:41 :: found beforescript in configuration None                 
                               
2010/03/01 20:55:41 :: found predisconnectscript in configuration None          
                               
2010/03/01 20:55:42 :: ifconfig eth0                                            
                               
2010/03/01 20:55:42 :: ifconfig wlan0                                           
                               
2010/03/01 20:55:45 :: ifconfig eth0                                            
                               
2010/03/01 20:55:45 :: ifconfig wlan0                                           
                               
2010/03/01 20:55:46 :: Forced disconnect on                                     
                               
2010/03/01 20:55:46 :: iwconfig wlan0                                           
                               
2010/03/01 20:55:46 :: Running pre-disconnect script                            
                               
2010/03/01 20:55:49 :: ifconfig eth0                                            
                               
2010/03/01 20:55:49 :: ifconfig wlan0                                           
                               
2010/03/01 20:55:51 :: Connecting to wireless network rrs                       
                               
2010/03/01 20:55:51 :: iwconfig wlan0                                           
                               
2010/03/01 20:55:51 :: attempting to set hostname with dhclient                 
                               
2010/03/01 20:55:51 :: using dhcpcd or another supported client may work better 
                               
2010/03/01 20:55:51 :: /sbin/dhclient -r wlan0                                  
                               
2010/03/01 20:55:51 :: ifconfig wlan0 0.0.0.0                                   
                               
2010/03/01 20:55:51 :: /sbin/ip route flush dev wlan0                           
                               
2010/03/01 20:55:51 :: ifconfig wlan0 down                                      
                               
2010/03/01 20:55:51 :: ifconfig wlan0 up                                        
                               
2010/03/01 20:55:51 :: wpa_cli -i wlan0 terminate                               
                               
2010/03/01 20:55:51 :: attempting to set hostname with dhclient                 
                               
2010/03/01 20:55:51 :: using dhcpcd or another supported client may work better 
                               
2010/03/01 20:55:51 :: /sbin/dhclient -r eth0                                   
                               
2010/03/01 20:55:51 :: ifconfig eth0 0.0.0.0                                    
                               
2010/03/01 20:55:51 :: /sbin/ip route flush dev eth0                            
                               
2010/03/01 20:55:51 :: ifconfig eth0 down                                       
                               
2010/03/01 20:55:51 :: ifconfig eth0 up                                         
                               
2010/03/01 20:55:52 :: ifconfig eth0                                            
                               
2010/03/01 20:55:52 :: Putting interface down                                   
                               
2010/03/01 20:55:52 :: ifconfig wlan0 down                                      
                               
2010/03/01 20:55:52 :: ifconfig wlan0                                           
                               
2010/03/01 20:55:52 :: Releasing DHCP leases...                                 
                               
2010/03/01 20:55:52 :: attempting to set hostname with dhclient                 
                               
2010/03/01 20:55:52 :: using dhcpcd or another supported client may work better 
                               
2010/03/01 20:55:52 :: /sbin/dhclient -r wlan0                                  
                               
2010/03/01 20:55:52 :: Setting false IP...                                      
                               
2010/03/01 20:55:52 :: ifconfig wlan0 0.0.0.0                                   
                               
2010/03/01 20:55:52 :: Stopping wpa_supplicant                                  
                               
2010/03/01 20:55:52 :: wpa_cli -i wlan0 terminate                               
                               
2010/03/01 20:55:52 :: Flushing the routing table...                            
                               
2010/03/01 20:55:52 :: /sbin/ip route flush dev wlan0                           
                               
2010/03/01 20:55:52 :: iwconfig wlan0 mode managed                              
                               
2010/03/01 20:55:52 :: Putting interface up...                                  
                               
2010/03/01 20:55:52 :: ifconfig wlan0 up                                        
                               
2010/03/01 20:55:53 :: iwconfig wlan0                                           
                               
2010/03/01 20:55:54 :: enctype is wpa                                           
                               
2010/03/01 20:55:54 :: Generating psk...                                        
                               
2010/03/01 20:55:54 :: ['/usr/bin/wpa_passphrase', 'rrs', 'xxx']                
   
2010/03/01 20:55:54 :: Attempting to authenticate...                            
                               
2010/03/01 20:55:54 :: ['wpa_supplicant', '-B', '-i', 'wlan0', '-c', 
'/var/lib/wicd/configurations/0016b6a5e71c', '-D', 'wext']                      
                                                                         
2010/03/01 20:55:54 :: ['iwconfig', 'wlan0', 'essid', 'rrs']                    
                               
2010/03/01 20:55:54 :: iwconfig wlan0 channel 6                                 
                               
2010/03/01 20:55:54 :: iwconfig wlan0 ap 00:16:B6:A5:E7:1C                      
                               
2010/03/01 20:55:54 :: WPA_CLI RESULT IS ASSOCIATING                            
                               
2010/03/01 20:55:55 :: WPA_CLI RESULT IS COMPLETED                              
                               
2010/03/01 20:55:55 :: Running DHCP with hostname champaran                     
                               
2010/03/01 20:55:55 :: attempting to set hostname with dhclient                 
                               
2010/03/01 20:55:55 :: using dhcpcd or another supported client may work better 
                               
2010/03/01 20:55:55 :: /sbin/dhclient -cf /var/lib/wicd/dhclient.conf wlan0     
                               
2010/03/01 20:55:55 :: Internet Systems Consortium DHCP Client V3.1.3           
                               
2010/03/01 20:55:55 :: Copyright 2004-2009 Internet Systems Consortium.         
                               
2010/03/01 20:55:55 :: All rights reserved.                                     
                               
2010/03/01 20:55:55 :: For info, please visit 
https://www.isc.org/software/dhcp/                               
2010/03/01 20:55:55 ::                                                          
                               
2010/03/01 20:55:55 :: Listening on LPF/wlan0/00:26:c6:72:07:9a                 
                               
2010/03/01 20:55:55 :: Sending on   LPF/wlan0/00:26:c6:72:07:9a                 
                               
2010/03/01 20:55:55 :: Sending on   Socket/fallback                             
                               
2010/03/01 20:55:55 :: iwconfig wlan0                                           
                               
2010/03/01 20:55:57 :: DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 
interval 7                             
2010/03/01 20:55:58 :: DHCPOFFER from 192.168.2.1                               
                               
2010/03/01 20:55:58 :: DHCPREQUEST on wlan0 to 255.255.255.255 port 67          
                               
2010/03/01 20:55:58 :: DHCPACK from 192.168.2.1                                 
                               
2010/03/01 20:55:58 :: iwconfig wlan0                                           
                               
2010/03/01 20:55:59 :: bound to 192.168.2.102 -- renewal in 42143 seconds.      
                               
2010/03/01 20:55:59 :: DHCP connection successful                               
                               
2010/03/01 20:55:59 :: not verifying                                            
                               
2010/03/01 20:55:59 :: Executing post-connection script                         
                               
2010/03/01 20:55:59 :: Expanded '/home/rrs/bin/vpnc-connect.sh' to 
'/home/rrs/bin/vpnc-connect.sh'             
2010/03/01 20:55:59 :: Executing /home/rrs/bin/vpnc-connect.sh with params      
                               
2010/03/01 20:56:00 :: /home/rrs/bin/vpnc-connect.sh returned 0                 
                               
2010/03/01 20:56:00 :: Connecting thread exiting.                               
                               
2010/03/01 20:56:00 :: ifconfig wlan0                                           
                               
2010/03/01 20:56:00 :: IP Address is: 192.168.2.102                             
                               
2010/03/01 20:56:00 :: Sending connection attempt result Success                
                               
2010/03/01 20:56:00 :: ifconfig eth0                                            
                               
2010/03/01 20:56:00 :: iwconfig wlan0
2010/03/01 20:56:03 :: ifconfig eth0
2010/03/01 20:56:03 :: ifconfig wlan0
2010/03/01 20:56:04 :: iwconfig wlan0
2010/03/01 20:56:05 :: ifconfig eth0
2010/03/01 20:56:07 :: ifconfig wlan0
2010/03/01 20:56:07 :: iwconfig wlan0
2010/03/01 20:56:08 :: ifconfig eth0
2010/03/01 20:56:09 :: ifconfig wlan0
2010/03/01 20:56:10 :: iwconfig wlan0
2010/03/01 20:56:11 :: ifconfig eth0
2010/03/01 20:56:12 :: ifconfig wlan0
2010/03/01 20:56:12 :: iwconfig wlan0
2010/03/01 20:56:13 :: ifconfig eth0
2010/03/01 20:56:14 :: ifconfig wlan0

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to