diff options
-rw-r--r-- | scripts/vyos-openvpn-remoteconfig.pl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/vyos-openvpn-remoteconfig.pl b/scripts/vyos-openvpn-remoteconfig.pl index 1777d08..6412364 100644 --- a/scripts/vyos-openvpn-remoteconfig.pl +++ b/scripts/vyos-openvpn-remoteconfig.pl @@ -28,6 +28,11 @@ sub auth_warning my $config = new Vyatta::Config; +if(!$config->inSession()) { + print("This command can only be used from configuration mode!"); + exit(1); +} + my $intf = $ARGV[0]; if(!defined($intf)) { |