Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#13238 - [netcfg] PRE_DOWN/POST_DOWN stops loading profile
Attached to Project:
Arch Linux
Opened by Nick Martin (nijm) - Thursday, 12 February 2009, 12:28 GMT
Last edited by James Rayner (iphitus) - Saturday, 06 June 2009, 01:45 GMT
Opened by Nick Martin (nijm) - Thursday, 12 February 2009, 12:28 GMT
Last edited by James Rayner (iphitus) - Saturday, 06 June 2009, 01:45 GMT
|
DetailsDescription:
Adding either of the following lines (or lines like them) prevents bringing up/down network profiles: POST_DOWN="/bin/bash -c '/bin/kill `/bin/pidof vpnc`'" PRE_DOWN="/bin/bash -c '/bin/kill `/bin/pidof vpnc`'" Removing these lines results in being able to bring up/down the network profile. Additional info: * package version(s) : 2.1.2-1 * config files: /etc/network.d/university: CONNECTION="wireless" DESCRIPTION="University Wireless" INTERFACE=eth1 SCAN="yes" SECURITY="none" ESSID="University of Manchester" KEY="" IP="dhcp" POST_UP="/usr/local/sbin/vpnc university &>/dev/null" POST_DOWN="/bin/bash -c '/bin/kill `/bin/pidof vpnc`'" Steps to reproduce: Add a PRE_DOWN/POST_DOWN to your network profile, then: netcfg <profile_name> netcfg -a |
This task depends upon
[jan@jan ~]$ export POST_DOWN="/bin/bash -c '/bin/kill `/bin/pidof vpnc`'"
[jan@jan ~]$ echo $POST_DOWN
/bin/bash -c '/bin/kill '
[jan@jan ~]$ $POST_DOWN
': -c: line 0: unexpected EOF while looking for matching `''
': -c: line 1: syntax error: unexpected end of file
Because of the syntax error, netcfg will abort.
[...]
POST_UP="vpnc uni-dsl"
PRE_DOWN="vpnc-disconnect"
When I change from a profile without vpnc to one with vpnc like shown above, I get this result:
:: profileWithVPN up [BUSY]
:: profileWithoutVPN down [BUSY]
no vpnc found running
and it does not connect. Inspecting the code, I think this is because the new profile (with vpn) gets already loaded when checking if it exists, setting the PRE_DOWN variable. Then the old one (without vpn) gets unloaded, but WITHOUT unsetting the PRE_DOWN variable. This causes the vpnc-disconnect to be run and fail. Running first "netcfg -a" and then a netcfg with the new profile works.