diff options
author | Daniil Baturin <daniil@vyos.io> | 2020-06-25 08:57:44 +0300 |
---|---|---|
committer | Daniil Baturin <daniil@vyos.io> | 2020-06-25 08:58:23 +0300 |
commit | 10003bcce49604d394a9a8b746748f5dfd334cdd (patch) | |
tree | c672ef51922aa426ded3e84184bd843fee019d5c /scripts | |
parent | efda294a0bee479df39534f9d6676cb134c49d76 (diff) | |
download | vyatta-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.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)) { |