Generate machine-id only if not already present.

This commit is contained in:
Jocelyn Le Sage 2018-08-10 13:30:05 -04:00
parent 0137a0e0b2
commit db0d52d785

View File

@ -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)"