| #!/bin/sh -e |
| |
| # Remove leftover bootstrap log files. |
| rm -f /var/log/bootstrap.log |
| |
| # Fix up our hostname and make sure it can be resolved to something sane |
| echo aiy >/etc/hostname |
| echo 127.0.0.1 aiy >>/etc/hosts |
| |
| # We need spidev stuff loaded so that we get SPI access |
| # XXX: Should this live here? Seems specific to a particular board. |
| echo spidev >> /etc/modules |
| |
| # Choose a locale and regenerate it to eliminate LC warnings. |
| echo en_US.UTF-8 UTF-8 >/etc/locale.gen |
| locale-gen |
| echo LANG=en_US.UTF-8 >/etc/locale.conf |
| |
| # Add the aiy user and give them all the access they need. |
| adduser aiy --home /home/aiy --shell /bin/bash --disabled-password --gecos "" || true |
| mkdir -p /home/aiy |
| chown aiy:aiy /home/aiy |
| echo 'aiy:aiy' |chpasswd |
| |
| # Create group apex to give aiy user r/w privileges to apex devices |
| groupadd apex |
| |
| GROUPS="adm audio bluetooth games i2c input plugdev staff sudo users video netdev systemd-journal apex" |
| |
| for group in $GROUPS; do \ |
| adduser aiy $group; \ |
| done |
| |
| if ! grep -q aiy /etc/sudoers; then |
| echo 'aiy ALL=(ALL) NOPASSWD: ALL' >>/etc/sudoers |
| fi |
| |
| #DEBHELPER# |