Pascal Vizeli d1d3593d65
Fix boot (#459)
* Fix permission check

* Remove fails on copy

* Disable FB_BCM2708

* Don't touch the memory map from first stage

* bootcode.bin is not needed on rpi4
2019-08-28 10:32:46 +02:00

24 lines
489 B
Bash
Executable File

#!/bin/bash
set -e
USER="root"
# Run dockerd
dockerd -s vfs &> /dev/null &
# Setup local user
if [ "${BUILDER_UID:-0}" -ne 0 ] && [ "${BUILDER_GID:-0}" -ne 0 ]; then
groupadd -g "${BUILDER_GID}" builder
useradd -m -u "${BUILDER_UID}" -g "${BUILDER_GID}" -G docker,sudo builder
echo "builder ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers
USER="builder"
fi
if CMD="$(command -v "$1")"; then
shift
sudo -H -u ${USER} "$CMD" "$@"
else
echo "Command not found: $1"
exit 1
fi