Files
Cantibra e63ec7dc13
All checks were successful
Geekwom NASPi Daemon (Bookworm) / Geekwom NASPi Daemon [arm64] (push) Successful in 10s
Geekwom NASPi Daemon (Noble) / Geekwom NASPi Daemon [arm64] (push) Successful in 11s
Geekwom NASPi Daemon (Trixie) / Geekwom NASPi Daemon [arm64] (push) Successful in 11s
Initialize Git Repository: 'Geekwom-NASPi-Daemon'
2026-01-26 06:10:10 +01:00

26 lines
923 B
Bash

#!/usr/bin/sh
set -e
set -u
BOOT=$(/usr/bin/grep '/boot' '/etc/fstab' | /usr/bin/mawk '$1 !~ /^#/ && $2 ~ /^[/]/ {print $2}')
/usr/bin/test -n "${BOOT}"
case "${1}" in
install)
/usr/bin/echo '' >> "${BOOT}/config.txt"
/usr/bin/echo '## pwm-2chan' >> "${BOOT}/config.txt"
/usr/bin/echo '## Load the Pulse-Width Modulation driver.' >> "${BOOT}/config.txt"
/usr/bin/echo '##' >> "${BOOT}/config.txt"
/usr/bin/echo 'dtoverlay=pwm-2chan' >> "${BOOT}/config.txt"
/usr/bin/echo ''
/usr/bin/echo '########################################################'
/usr/bin/echo '# #'
/usr/bin/echo '# ! Restart the device to load the necessary drivers ! #'
/usr/bin/echo '# #'
/usr/bin/echo '########################################################'
/usr/bin/echo ''
;;
esac