summaryrefslogtreecommitdiff
path: root/scripts
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:58:23 +0300
commit10003bcce49604d394a9a8b746748f5dfd334cdd (patch)
treec672ef51922aa426ded3e84184bd843fee019d5c /scripts
parentefda294a0bee479df39534f9d6676cb134c49d76 (diff)
downloadvyatta-op-10003bcce49604d394a9a8b746748f5dfd334cdd.tar.gz
vyatta-op-10003bcce49604d394a9a8b746748f5dfd334cdd.zip
T2329: show a warning about "show remote-config" when run from op mode.
Diffstat (limited to 'scripts')
-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))
{