summaryrefslogtreecommitdiff
path: root/python/vyos
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-02-07 21:34:45 +0100
committerChristian Breunig <christian@breunig.cc>2024-02-07 21:34:45 +0100
commit9b8e11e078c42e3ae86ebfa45fec57336f25a0af (patch)
tree576c12250def7c68147540ab6cb77cc0c3024bec /python/vyos
parent9d74ae52092e97aa0ef285df4d44a5eb7ae93fbf (diff)
downloadvyos-1x-9b8e11e078c42e3ae86ebfa45fec57336f25a0af.tar.gz
vyos-1x-9b8e11e078c42e3ae86ebfa45fec57336f25a0af.zip
init: T2044: only start rpki if cache is configured
This extends commit 9199c87cf ("init: T2044: always start/stop rpki during system boot") to check the bootup configuration if an RPKI cache is defined. Only start RPKI if this is the case.
Diffstat (limited to 'python/vyos')
-rw-r--r--python/vyos/utils/config.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/python/vyos/utils/config.py b/python/vyos/utils/config.py
index bd363ce46..33047010b 100644
--- a/python/vyos/utils/config.py
+++ b/python/vyos/utils/config.py
@@ -1,4 +1,4 @@
-# Copyright 2023 VyOS maintainers and contributors <maintainers@vyos.io>
+# Copyright 2023-2024 VyOS maintainers and contributors <maintainers@vyos.io>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -31,4 +31,9 @@ def read_saved_value(path: list):
if not ct.exists(path):
return ''
res = ct.return_values(path)
- return res[0] if len(res) == 1 else res
+ if len(res) == 1:
+ return res[0]
+ res = ct.list_nodes(path)
+ if len(res) == 1:
+ return ' '.join(res)
+ return res