Remove deprecated one-shot scripts and update first-boot configuration for improved provisioning</message>
<message>Delete obsolete one-shot scripts for setting screen rotation and wallpaper, as well as related Python and shell scripts. Update the first-boot configuration to streamline the provisioning process by removing references to these scripts. This cleanup enhances maintainability and focuses on the essential steps required for the first boot experience, ensuring a more efficient setup for users.
This commit is contained in:
28
emmc-provisioning/cloud-init/fileserver/steps/11-oneshots.sh
Normal file
28
emmc-provisioning/cloud-init/fileserver/steps/11-oneshots.sh
Normal file
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
# Step 11: Install one-shot and per-login scripts
|
||||
|
||||
step_11_oneshots() {
|
||||
# Rotation: install set-rotation-at-login (re-applies kanshi config every login)
|
||||
if [[ -n "$DSI_ROTATE" ]]; then
|
||||
log "Rotation $DSI_ROTATE set via cmdline"
|
||||
if curl -fsSL "${FILE_SERVER}/set-rotation-at-login.sh" -o "$PI_HOME/set-rotation-at-login.sh" 2>/dev/null; then
|
||||
chmod 755 "$PI_HOME/set-rotation-at-login.sh"
|
||||
chown "$PI_USER:$PI_USER" "$PI_HOME/set-rotation-at-login.sh"
|
||||
if curl -fsSL "${FILE_SERVER}/set-rotation-at-login.desktop" -o /tmp/sral.desktop 2>/dev/null; then
|
||||
sed "s|/home/pi|$PI_HOME|g" /tmp/sral.desktop > "$AUTOSTART/set-rotation-at-login.desktop"
|
||||
chown "$PI_USER:$PI_USER" "$AUTOSTART/set-rotation-at-login.desktop"
|
||||
rm -f /tmp/sral.desktop
|
||||
log "set-rotation-at-login installed"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Additional one-shots from config
|
||||
if [[ -n "$ONESHOT_SCRIPTS" ]]; then
|
||||
for _name in $ONESHOT_SCRIPTS; do
|
||||
install_oneshot "$_name" || true
|
||||
done
|
||||
else
|
||||
log "No additional one-shot scripts"
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user