diff options
author | John Estabrook <jestabro@vyos.io> | 2024-10-24 11:04:39 -0500 |
---|---|---|
committer | John Estabrook <jestabro@vyos.io> | 2024-10-25 12:13:11 -0500 |
commit | c94254e4a5771d4cabc0d373210cdd3362501b9d (patch) | |
tree | a59160862670da61bf6a0aaa825fa4c4d1ebc171 /src | |
parent | 45c65c695d6df0cb9cd46ef12245b59514b53549 (diff) | |
download | vyos1x-config-c94254e4a5771d4cabc0d373210cdd3362501b9d.tar.gz vyos1x-config-c94254e4a5771d4cabc0d373210cdd3362501b9d.zip |
T6718: inject environment variables required by certain validators
Diffstat (limited to 'src')
-rw-r--r-- | src/value_checker.ml | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/value_checker.ml b/src/value_checker.ml index d94f99d..9e6dae8 100644 --- a/src/value_checker.ml +++ b/src/value_checker.ml @@ -28,6 +28,8 @@ let validate_value dir buf value_constraint value = | None -> Printf.sprintf "%s \'%s\' 2>&1" validator value in + let () = Unix.putenv "vyos_libexec_dir" "/usr/libexec/vyos" in + let () = Unix.putenv "vyos_validators_dir" "/usr/libexec/vyos/validators" in let chan = Unix.open_process_in cmd in let out = try CCIO.read_all chan with _ -> "" in let result = Unix.close_process_in chan in |