summaryrefslogtreecommitdiff
path: root/scripts/init/vyos-router
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-10-31 14:57:03 +0100
committerChristian Poessinger <christian@poessinger.com>2021-10-31 14:57:03 +0100
commit77569a0c2fa529289bfc6c8f77e8edbc221f54b9 (patch)
treec0665c24bd0d879db29e9620d809b60b2b3556d4 /scripts/init/vyos-router
parent224941480bb5e41ee6b43e3bf0f357568f18d44f (diff)
downloadvyatta-cfg-77569a0c2fa529289bfc6c8f77e8edbc221f54b9.tar.gz
vyatta-cfg-77569a0c2fa529289bfc6c8f77e8edbc221f54b9.zip
vyos-router: dhcpv6: T3885: fix stderr output when main UUID source is not present
Diffstat (limited to 'scripts/init/vyos-router')
-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