1
Geekwom NASPi Daemon / Geekwom NASPi Daemon (arm64, cicd.any, bookworm trixie noble, main) (push) Successful in 11s

This commit is contained in:
Cantibra
2026-05-21 07:31:32 +02:00
parent 25f3501348
commit 32897a7912
3 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
set -e
set -u
BOOT=$(/usr/bin/grep '/boot' '/etc/fstab' | /usr/bin/mawk '$1 !~ /^#/ && $2 ~ /^[/]/ {print $2}')
BOOT=$(/usr/bin/grep '/boot' '/etc/fstab' | /usr/bin/awk '$1 !~ /^#/ && $2 ~ /^[/]/ {print $2}')
/usr/bin/test -n "${BOOT}"
if [ -d '/run/systemd/system' ]; then
+1 -1
View File
@@ -3,7 +3,7 @@
set -e
set -u
BOOT=$(/usr/bin/grep '/boot' '/etc/fstab' | /usr/bin/mawk '$1 !~ /^#/ && $2 ~ /^[/]/ {print $2}')
BOOT=$(/usr/bin/grep '/boot' '/etc/fstab' | /usr/bin/awk '$1 !~ /^#/ && $2 ~ /^[/]/ {print $2}')
/usr/bin/test -n "${BOOT}"
+3 -3
View File
@@ -28,7 +28,7 @@ PWM_CHIP_PATH='/sys/class/pwm/pwmchip0'
###
function num_compare () {
/usr/bin/mawk "BEGIN {exit !($*)}"
/usr/bin/awk "BEGIN {exit !($*)}"
}
function pwm_get_chip_path () {
@@ -61,7 +61,7 @@ function pwm_create () {
function frequency_to_period () {
local FREQUENCY="${1}"
PERC=$(/usr/bin/mawk -v freq="${FREQUENCY}" 'BEGIN { printf "%.0f", 1 / freq * 1000 * 1000000; exit(0) }')
PERC=$(/usr/bin/awk -v freq="${FREQUENCY}" 'BEGIN { printf "%.0f", 1 / freq * 1000 * 1000000; exit(0) }')
/usr/bin/echo "${PERC}"
}
@@ -73,7 +73,7 @@ function pwm_change_duty_cycle () {
return 1
fi
PERIOD=$(frequency_to_period "${FREQUENCY}")
NEW_DUTY_CYCLE=$(/usr/bin/mawk -v period="${PERIOD}" -v dc="${DUTY_CYCLE}" 'BEGIN { printf "%.0f", period * dc / 100; exit(0) }')
NEW_DUTY_CYCLE=$(/usr/bin/awk -v period="${PERIOD}" -v dc="${DUTY_CYCLE}" 'BEGIN { printf "%.0f", period * dc / 100; exit(0) }')
/usr/bin/echo "${NEW_DUTY_CYCLE}" > "$(pwm_get_channel_path "${CHANNEL}" 'duty_cycle')"
}