summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2020-06-25 08:57:44 +0300
committerDaniil Baturin <daniil@vyos.io>2020-06-25 08:57:44 +0300
commit86763376cc9c885d3e7fffbe8d1843c5a30adbd7 (patch)
tree582781f4b11c8825b56433c69c1abce706aeaed1
parentd3bed7a9f3fd4394d11a223bffa298659540cac9 (diff)
downloadvyatta-op-86763376cc9c885d3e7fffbe8d1843c5a30adbd7.tar.gz
vyatta-op-86763376cc9c885d3e7fffbe8d1843c5a30adbd7.zip
T2329: show a warning about "show remote-config" when run from op mode.
-rw-r--r--scripts/vyos-openvpn-remoteconfig.pl5
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))
{