Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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
7 changes: 6 additions & 1 deletion builder/chroot-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ apt-get -o Dpkg::Options::=--force-confdef \
pi-bluetooth \
lsb-release \
gettext \
cloud-init
cloud-init \
pt-ui-mods \
git


# install special Docker enabled kernel
Expand Down Expand Up @@ -220,3 +222,6 @@ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
echo "HYPRIOT_DEVICE=\"$HYPRIOT_DEVICE\"" >> /etc/os-release
echo "HYPRIOT_IMAGE_VERSION=\"$HYPRIOT_IMAGE_VERSION\"" >> /etc/os-release
cp /etc/os-release /boot/os-release

# Integrate camera development work (see https://publiclab.org/notes/MaggPi/08-09-2018/raspberry-pi-manual-camera-control )
git clone https://github.com/MargaretAN9/Peggy/ /home/publiclab/Peggy
3 changes: 3 additions & 0 deletions builder/files/boot/user-data
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,8 @@ runcmd:
# Pickup the hostname changes
- 'systemctl restart avahi-daemon'

# Give ownership of scripts
- 'chown publiclab.publiclab /home/publiclab/Peggy -R'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, will this often be necessary? Does chroot-script run as root, and could this in theory be put there? Thinking about how to learn from this example. Thanks!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I predict it is necessary because at the time of git cloning (image build time), it is running as root.
Commands in user-data run on first boot (including user creation!). This is my understanding from seeing cloud-init documentation.

We'll see!


# # Activate WiFi interface
# - 'ifup wlan0'