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:57:44 +0300 |
| commit | 86763376cc9c885d3e7fffbe8d1843c5a30adbd7 (patch) | |
| tree | 582781f4b11c8825b56433c69c1abce706aeaed1 /scripts | |
| parent | d3bed7a9f3fd4394d11a223bffa298659540cac9 (diff) | |
| download | vyatta-op-86763376cc9c885d3e7fffbe8d1843c5a30adbd7.tar.gz vyatta-op-86763376cc9c885d3e7fffbe8d1843c5a30adbd7.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)) { |
