-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchroot-final.sh
More file actions
executable file
·32 lines (22 loc) · 847 Bytes
/
chroot-final.sh
File metadata and controls
executable file
·32 lines (22 loc) · 847 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
set -exuo pipefail
trap 's=$?; echo "$0: Error on line "$LINENO": $BASH_COMMAND"; exit $s' ERR
echo "Running on: `uname -a`"
# Very useful for development/debugging
#systemctl disable sshd
# Ensure wifi is disabled
systemctl disable wpa_supplicant
# Enable the services on login/startup
systemctl enable x11-autologin.service
systemctl enable set-kiosk-url-from-cmdline.service
systemctl enable apply-remote-configuration.timer
systemctl enable redo-dhcp.service
# Ensure everything in rockys home folder is owned by rocky
chown -R rocky:rocky /home/rocky
# Set the user password
echo "$RPI_USER_PASSWORD" | passwd --stdin rocky
# Remove "unwanted" README
rm -f /home/rocky/README
# Remove log files
find /var/log -type f -name "*.log" -delete
# TODO Maybe there are other files we can remove from rootfs to make it skinner?