e3a9160c0d
The various Neutron plugin files need to have unique variables for the xtrace state as they are sometimes nested more than two levels deep and MY_XTRACE is getting stomped. This gives each of the neutron_plugin and neutron_thirdparty include files a unique XTRACE state variable. I don't think this is a problem with any of the other plugin include files (yet) so this just handles Neutron for now. Change-Id: I7c272a48e7974edecaff5f431ff7443dd6622588
34 lines
753 B
Plaintext
34 lines
753 B
Plaintext
# Neutron VPN plugin
|
|
# ---------------------------
|
|
|
|
# Save trace setting
|
|
VPN_XTRACE=$(set +o | grep xtrace)
|
|
set +o xtrace
|
|
|
|
|
|
AGENT_VPN_BINARY="$NEUTRON_BIN_DIR/neutron-vpn-agent"
|
|
VPN_PLUGIN="neutron.services.vpn.plugin.VPNDriverPlugin"
|
|
IPSEC_PACKAGE=${IPSEC_PACKAGE:-"openswan"}
|
|
|
|
function neutron_vpn_install_agent_packages {
|
|
install_package $IPSEC_PACKAGE
|
|
}
|
|
|
|
function neutron_vpn_configure_common {
|
|
_neutron_service_plugin_class_add $VPN_PLUGIN
|
|
}
|
|
|
|
function neutron_vpn_stop {
|
|
local ipsec_data_dir=$DATA_DIR/neutron/ipsec
|
|
local pids
|
|
if [ -d $ipsec_data_dir ]; then
|
|
pids=$(find $ipsec_data_dir -name 'pluto.pid' -exec cat {} \;)
|
|
fi
|
|
if [ -n "$pids" ]; then
|
|
sudo kill $pids
|
|
fi
|
|
}
|
|
|
|
# Restore xtrace
|
|
$VPN_XTRACE
|