tags 294332 patch retitle 294332 openvpn: Start only some VPNs on startup and other fixes submitter 294332 ! thanks
Hello, first of all, the $IF_OPENVPN variable can be "set" by using the directive "openvpn vpn_name" in the section of the corresponding interface in /etc/network/interfaces. For example to control the VPN "home" according to the state of interface "eth0", consider the following: auto eth0 iface eth0 inet dhcp openvpn home On the other hand, the need of a fine grained control which VPNs to start during system boot is still needed, IMHO. Therefore, I prepared the attached patch, which makes use of a file in /etc/default. The patch fixes some other minor issues in the init script: - on restart with given VPN names, now multiple networks can be restarted: "# /etc/init.d/openvpn restart vpn0 vpn1" works now. - in the grep for "daemon" in config file a tab seemed to be converted to spaces - the status file is now purged on stop - a custom status file given in config skips "--status" argument (Actually, this is not really necessary, since the "status" directive in config file seems to take precedence over the command-line argument.) - refresh interval of the status file can be customized and status file generation can be disabled (by setting interval to 0) Please consider to apply this patch. If you do not want to include all changes, I can send you separate patches for the different issues. Regards, Philipp
autostart-restart-status.patch.gz
Description: GNU Zip compressed data
signature.asc
Description: This is a digitally signed message part