diff --git a/geekworm-naspi/DEBIAN/postrm b/geekworm-naspi/DEBIAN/postrm index de79f23..25e8645 100644 --- a/geekworm-naspi/DEBIAN/postrm +++ b/geekworm-naspi/DEBIAN/postrm @@ -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 diff --git a/geekworm-naspi/DEBIAN/preinst b/geekworm-naspi/DEBIAN/preinst index 7824c69..bad8247 100644 --- a/geekworm-naspi/DEBIAN/preinst +++ b/geekworm-naspi/DEBIAN/preinst @@ -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}" diff --git a/geekworm-naspi/usr/lib/geekworm-naspi/pwmd b/geekworm-naspi/usr/lib/geekworm-naspi/pwmd index f4e893f..01b5663 100644 --- a/geekworm-naspi/usr/lib/geekworm-naspi/pwmd +++ b/geekworm-naspi/usr/lib/geekworm-naspi/pwmd @@ -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')" }