From 86b6b7d97e9575eac7fab5e833d07653f6ebd32e Mon Sep 17 00:00:00 2001 From: Reza Jelveh Date: Mon, 27 Nov 2017 10:19:41 +0100 Subject: [PATCH] SmartOS: add uuid binary since /proc/sys/kernel/random/uuid does not exist --- setup/web.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/setup/web.sh b/setup/web.sh index ed37e5e3..d02ed8bd 100755 --- a/setup/web.sh +++ b/setup/web.sh @@ -64,12 +64,15 @@ tools/editconf.py /etc/php/7.2/fpm/pool.d/www.conf -c ';' \ # nginx configuration at /mailinabox-mobileconfig. mkdir -p /var/lib/mailinabox chmod a+rx /var/lib/mailinabox +if [[ -n "$LX_ZONE" ]]; then + apt_install uuid +fi cat conf/ios-profile.xml \ | sed "s/PRIMARY_HOSTNAME/$PRIMARY_HOSTNAME/" \ - | sed "s/UUID1/$(cat /proc/sys/kernel/random/uuid)/" \ - | sed "s/UUID2/$(cat /proc/sys/kernel/random/uuid)/" \ - | sed "s/UUID3/$(cat /proc/sys/kernel/random/uuid)/" \ - | sed "s/UUID4/$(cat /proc/sys/kernel/random/uuid)/" \ + | sed "s/UUID1/$(cat /proc/sys/kernel/random/uuid || uuid)/" \ + | sed "s/UUID2/$(cat /proc/sys/kernel/random/uuid || uuid)/" \ + | sed "s/UUID3/$(cat /proc/sys/kernel/random/uuid || uuid)/" \ + | sed "s/UUID4/$(cat /proc/sys/kernel/random/uuid || uuid)/" \ > /var/lib/mailinabox/mobileconfig.xml chmod a+r /var/lib/mailinabox/mobileconfig.xml