Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes to adapt setup to last Raspbian and Debian versions #6

Merged
merged 1 commit into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions base.Pifile
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,7 @@ hostname=kolibri
RUN sed -i "s/raspberrypi/${hostname}/g" /etc/hostname
RUN sed -i "s/raspberrypi/${hostname}/g" /etc/hosts

# Set password for specified user (pi by default)

echo "Changing password of pi..."

# Redirect output to prevent echoing sensitive information to stdout
RUN << EOF &> /dev/null
bash -c "echo ${user}:kolibrifly | chpasswd"
EOF

echo "Done."

Expand Down Expand Up @@ -76,10 +69,24 @@ RUN tee /etc/default/dnsmasq <<EOF
DNSMASQ_EXCEPT=lo
EOF

# latest debian version seems to have this line commented
RUN bash -c "sed -i 's/^#conf-dir=\\/etc\\/dnsmasq.d\\/,.*/conf-dir=\\/etc\\/dnsmasq.d\\/,*.conf/' /etc/dnsmasq.conf"

RUN rm /etc/nginx/sites-enabled/default

RUN systemctl enable hostapd
RUN systemctl enable dnsmasq
RUN systemctl enable nginx
RUN systemctl enable ssh


# Set kolibryfly password for specified user (pi by default)
RUN bash -c 'echo pi:\$6\$OUzfiWw5K8RdwdFV\$7Skel9ojIekqNSE/KVPIhemg9D.tQqoOF2BwZwIgZ/X0CTC0MJPbcUmzvnSSE3CkBdG2zsD1rCHSQ9yQCqVfr/ > /boot/firmware/userconf.txt'

# avoid keyboard setup questions blocking first boot:
RUN sh -c 'echo "keyboard-configuration keyboard-configuration/layout select English (US)" | sudo debconf-set-selections'
RUN tee -a /boot/firmware/cmdline.txt<<EOF
debconf=low
EOF

ENV DEBIAN_FRONTEND
9 changes: 9 additions & 0 deletions kolibri.Pifile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ ENV DEBIAN_FRONTEND noninteractive

echo "--- Using Kolibri deb"

# Preseeding package config
RUN sh -c '
echo "kolibri kolibri/init boolean false" | debconf-set-selections; \
echo "kolibri kolibri/user string pi" | debconf-set-selections; \
echo "kolibri-server kolibri-server/port select 80" | debconf-set-selections; \
echo "kolibri-server kolibri-server/zip_content_port select 81" | debconf-set-selections
'


# All files copied at build stage to /pi-gen
INSTALL dist/*.deb /tmp/kolibri.deb

Expand Down