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

Limit log size and add pre-logon message #40

Merged
merged 7 commits into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
19 changes: 19 additions & 0 deletions files/issue.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

####### PhotonVision is the free, fast, and
############# easy-to-use computer vision solution
################# for the FIRST Robotics Competition.
###### ###### :::
##### ##*:::::::::: To configure PhotonVision, open:
##### :::::::::::::::::::
#### ::::::::::: ### http://photonvision.local:5800
#### ####
#### #### using a computer on the same network
#### :: ### as this device.
#### ::::::: ####
#### :::::::: #### Documentation is available at:
##### :::::::: :
###### ####::::::::: https://docs.photonvision.org/
################## ::::::
##############
#########

20 changes: 20 additions & 0 deletions install_common.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

# Run standard photon installer
chmod +x ./install.sh
./install.sh --install-nm=yes --arch=aarch64

# Do additional tasks that are common across all images,
# but not suitable for inclusion in install.sh

# Limit the maximum length of systemd-journald logs
cat > /etc/systemd/journald.conf.d/60-limit-log-size.conf <<EOF
# Added by Photonvision to keep the logs to a reasonable size
[Journal]
SystemMaxUse=100M
EOF

# Add a helpful message to the logon screen
cp -f ./files/issue /etc/issue
cp -f /etc/issue /etc/issue.net
sed -i 's/#Banner none/Banner \/etc\/issue.net/g' /etc/ssh/sshd_config
4 changes: 2 additions & 2 deletions install_limelight.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Run normal photon installer
chmod +x ./install.sh
./install.sh --install-nm=yes --arch=aarch64
chmod +x ./install_common.sh
./install_common.sh

# edit boot partition
install -m 644 limelight/config.txt /boot/
Expand Down
4 changes: 2 additions & 2 deletions install_opi5.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ freed=$(( before - after ))
echo "Freed up $freed KiB"

# run Photonvision install script
chmod +x ./install.sh
./install.sh --install-nm=yes --arch=aarch64
chmod +x ./install_common.sh
./install_common.sh

echo "Installing additional things"
apt-get install --yes --quiet libc6 libstdc++6
Expand Down
4 changes: 2 additions & 2 deletions install_pi.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Run normal photon installer
chmod +x ./install.sh
./install.sh --install-nm=yes --arch=aarch64
chmod +x ./install_common.sh
./install_common.sh

# and edit boot partition
install -m 644 config.txt /boot/
Expand Down
Loading