From 86763376cc9c885d3e7fffbe8d1843c5a30adbd7 Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Thu, 25 Jun 2020 08:57:44 +0300 Subject: T2329: show a warning about "show remote-config" when run from op mode. --- scripts/vyos-openvpn-remoteconfig.pl | 5 +++++ 1 file changed, 5 insertions(+) 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)) { -- cgit v1.2.3