summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/init/vyos-router4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/init/vyos-router b/scripts/init/vyos-router
index c6d84a6..31e9528 100755
--- a/scripts/init/vyos-router
+++ b/scripts/init/vyos-router
@@ -237,7 +237,9 @@ gen_duid ()
fi
# DUID is based on the BIOS/EFI UUID. We omit additional - characters
- UUID=$(cat ${UUID_FILE} | tr -d -)
+ if [ -f ${UUID_FILE} ]; then
+ UUID=$(cat ${UUID_FILE} | tr -d -)
+ fi
if [ -z ${UUID} ]; then
UUID=$(uuidgen --sha1 --namespace @dns --name $(cat ${UUID_FILE_ALT}) | tr -d -)
fi