summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIndrajit Raychaudhuri <irc@indrajit.com>2023-09-22 12:29:22 -0500
committerIndrajit Raychaudhuri <irc@indrajit.com>2023-09-23 22:10:30 -0500
commitd9f8ff7e277105e34afaa9164517b03ff7675d76 (patch)
tree533eb5bf227e18159bb4c214d80283f9e18d8c0c
parent8088cb8b6aacf9b7003845e4c9081b7f569b6fac (diff)
downloadvyos-1x-d9f8ff7e277105e34afaa9164517b03ff7675d76.tar.gz
vyos-1x-d9f8ff7e277105e34afaa9164517b03ff7675d76.zip
ddclient: T5612: Adjust validator and completion for ddclient
Adjust the validator and completion for ddclient to remove unsupported or superfluous protocols. Specifically, - remove 'nsupdate' protocol from the list because there is a separate config path for that protocol (rfc2136) - remove 'cloudns' protocol from the list because it has non standard configuration and is not supported by our configurator at this time
-rwxr-xr-xsrc/completion/list_ddclient_protocols.sh2
-rwxr-xr-xsrc/validators/ddclient-protocol2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/completion/list_ddclient_protocols.sh b/src/completion/list_ddclient_protocols.sh
index 75fb0cf44..3b4eff4d6 100755
--- a/src/completion/list_ddclient_protocols.sh
+++ b/src/completion/list_ddclient_protocols.sh
@@ -14,4 +14,4 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-echo -n $(ddclient -list-protocols)
+echo -n $(ddclient -list-protocols | grep -vE 'nsupdate|cloudns')
diff --git a/src/validators/ddclient-protocol b/src/validators/ddclient-protocol
index 6f927927b..bc6826120 100755
--- a/src/validators/ddclient-protocol
+++ b/src/validators/ddclient-protocol
@@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-ddclient -list-protocols | grep -qw $1
+ddclient -list-protocols | grep -vE 'nsupdate|cloudns' | grep -qw $1
if [ $? -gt 0 ]; then
echo "Error: $1 is not a valid protocol, please choose from the supported list of protocols"