SmartOS: add uuid binary since /proc/sys/kernel/random/uuid does not exist

This commit is contained in:
Reza Jelveh 2017-11-27 10:19:41 +01:00
parent be907a0b9b
commit 86b6b7d97e
1 changed files with 7 additions and 4 deletions

View File

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