You've already forked Geekwom-NASPi-Daemon
All checks were successful
Geekwom NASPi Daemon / Geekwom NASPi Daemon (Bookworm) [arm64] (push) Successful in 10s
22 lines
667 B
Bash
22 lines
667 B
Bash
#!/usr/bin/sh
|
|
|
|
set -e
|
|
set -u
|
|
|
|
case "${1}" in
|
|
install)
|
|
BOOT=$(/usr/bin/grep '/boot' '/etc/fstab' | /usr/bin/mawk '$1 !~ /^#/ && $2 ~ /^[/]/ {print $2}')
|
|
/usr/bin/test -n "${BOOT}"
|
|
/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 '## Restart the device to load the necessary drivers.'
|
|
/usr/bin/echo '##'
|
|
/usr/bin/echo '##'
|
|
;;
|
|
esac
|