summaryrefslogtreecommitdiff
path: root/src/validators/accel-radius-dictionary
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2022-10-03 12:16:31 -0400
committerDaniil Baturin <daniil@vyos.io>2022-10-03 12:16:31 -0400
commit14fb822154015dc7944187361153b4fed205730e (patch)
treef7d534327c0bae84bb34777fde49558ffbf06def /src/validators/accel-radius-dictionary
parent8248aaaa7952db580a199bd36202e7f26c19ec88 (diff)
downloadvyos-1x-14fb822154015dc7944187361153b4fed205730e.tar.gz
vyos-1x-14fb822154015dc7944187361153b4fed205730e.zip
T4726: add completion help and validation for accel-ppp vendor option
Diffstat (limited to 'src/validators/accel-radius-dictionary')
-rwxr-xr-xsrc/validators/accel-radius-dictionary13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/validators/accel-radius-dictionary b/src/validators/accel-radius-dictionary
new file mode 100755
index 000000000..05287e770
--- /dev/null
+++ b/src/validators/accel-radius-dictionary
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+DICT_PATH=/usr/share/accel-ppp/radius
+NAME=$1
+
+if [ -n "$NAME" -a -e $DICT_PATH/dictionary.$NAME ]; then
+ exit 0
+else
+ echo "$NAME is not a valid RADIUS dictionary name"
+ echo "Please make sure that $DICT_PATH/dictionary.$NAME file exists"
+ exit 1
+fi
+