From db0d52d785115a163313656238a612973a428f99 Mon Sep 17 00:00:00 2001 From: Jocelyn Le Sage Date: Fri, 10 Aug 2018 13:30:05 -0400 Subject: [PATCH] Generate machine-id only if not already present. --- rootfs/etc/cont-init.d/firefox.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rootfs/etc/cont-init.d/firefox.sh b/rootfs/etc/cont-init.d/firefox.sh index 94d7402..8498d5d 100755 --- a/rootfs/etc/cont-init.d/firefox.sh +++ b/rootfs/etc/cont-init.d/firefox.sh @@ -12,8 +12,10 @@ mkdir -p /config/downloads mkdir -p /config/log/firefox # Generate machine id. -log "generating machine-id..." -cat /proc/sys/kernel/random/uuid | tr -d '-' > /etc/machine-id +if [ ! -f /etc/machine-id ]; then + log "generating machine-id..." + cat /proc/sys/kernel/random/uuid | tr -d '-' > /etc/machine-id +fi # Verify the size of /dev/shm. SHM_SIZE_MB="$(df -m /dev/shm | tail -n 1 | tr -s ' ' | cut -d ' ' -f2)"