rtty: fix init script error handling

Fix variable quoting in test conditions and remove explicit stderr
redirects to improve error message handling and prevent boot log spam.

Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
John Crispin
2025-10-19 00:00:00 +02:00
parent f3cfa2be93
commit d7adb9ec5f

View File

@@ -25,21 +25,21 @@ start_rtty() {
local ifname
[ "$2" = 0 ] || {
echo "validation failed" >&2
echo "validation failed"
return 1
}
[ $enable -eq 0 -a $interval -eq 0 ] && return 1
[ "$enable" -eq 0 -a "$interval" -eq 0 ] && return 1
[ -n "$interface" ] && network_get_device ifname "$interface"
[ -z "$ifname" -a -z "$id" ] && {
echo "You must specify an interface or ID" >&2
echo "You must specify an interface or ID"
return 1
}
[ -z "$host" ] && {
echo "host required" >&2
echo "host required"
return 1
}