Skip to content

Commit 007695b

Browse files
authored
Merge pull request #6 from learningequality/raspbian_fixes
Fixes to adapt setup to last Raspbian and Debian versions
2 parents 63a60ea + b3e7985 commit 007695b

File tree

2 files changed

+23
-7
lines changed

2 files changed

+23
-7
lines changed

base.Pifile

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,7 @@ hostname=kolibri
1515
RUN sed -i "s/raspberrypi/${hostname}/g" /etc/hostname
1616
RUN sed -i "s/raspberrypi/${hostname}/g" /etc/hosts
1717

18-
# Set password for specified user (pi by default)
1918

20-
echo "Changing password of pi..."
21-
22-
# Redirect output to prevent echoing sensitive information to stdout
23-
RUN << EOF &> /dev/null
24-
bash -c "echo ${user}:kolibrifly | chpasswd"
25-
EOF
2619

2720
echo "Done."
2821

@@ -76,10 +69,24 @@ RUN tee /etc/default/dnsmasq <<EOF
7669
DNSMASQ_EXCEPT=lo
7770
EOF
7871

72+
# latest debian version seems to have this line commented
73+
RUN bash -c "sed -i 's/^#conf-dir=\\/etc\\/dnsmasq.d\\/,.*/conf-dir=\\/etc\\/dnsmasq.d\\/,*.conf/' /etc/dnsmasq.conf"
74+
7975
RUN rm /etc/nginx/sites-enabled/default
8076

8177
RUN systemctl enable hostapd
8278
RUN systemctl enable dnsmasq
8379
RUN systemctl enable nginx
80+
RUN systemctl enable ssh
81+
82+
83+
# Set kolibryfly password for specified user (pi by default)
84+
RUN bash -c 'echo pi:\$6\$OUzfiWw5K8RdwdFV\$7Skel9ojIekqNSE/KVPIhemg9D.tQqoOF2BwZwIgZ/X0CTC0MJPbcUmzvnSSE3CkBdG2zsD1rCHSQ9yQCqVfr/ > /boot/firmware/userconf.txt'
85+
86+
# avoid keyboard setup questions blocking first boot:
87+
RUN sh -c 'echo "keyboard-configuration keyboard-configuration/layout select English (US)" | sudo debconf-set-selections'
88+
RUN tee -a /boot/firmware/cmdline.txt<<EOF
89+
debconf=low
90+
EOF
8491

8592
ENV DEBIAN_FRONTEND

kolibri.Pifile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ ENV DEBIAN_FRONTEND noninteractive
77

88
echo "--- Using Kolibri deb"
99

10+
# Preseeding package config
11+
RUN sh -c '
12+
echo "kolibri kolibri/init boolean false" | debconf-set-selections; \
13+
echo "kolibri kolibri/user string pi" | debconf-set-selections; \
14+
echo "kolibri-server kolibri-server/port select 80" | debconf-set-selections; \
15+
echo "kolibri-server kolibri-server/zip_content_port select 81" | debconf-set-selections
16+
'
17+
18+
1019
# All files copied at build stage to /pi-gen
1120
INSTALL dist/*.deb /tmp/kolibri.deb
1221

0 commit comments

Comments
 (0)