diff --git a/net/keepalived/files/keepalived.init b/net/keepalived/files/keepalived.init index 59b798e203..dda66e822d 100644 --- a/net/keepalived/files/keepalived.init +++ b/net/keepalived/files/keepalived.init @@ -219,16 +219,14 @@ print_track_script_indent() { local name value weight direction config_get name "$section" name - [ "$name" != "$curr_track_elem" ] && return 0 + [ -z "$name" ] && return 0 - config_get value "$section" value config_get weight "$section" weight config_get direction "$section" direction - [ -z "$value" ] && return 0 [ "$direction" != "reverse" ] && [ "$direction" != "noreverse" ] && unset direction - printf '%b%s' "$indent" "$value" >> "$KEEPALIVED_CONF" + printf '%b%s' "$indent" "$name" >> "$KEEPALIVED_CONF" [ -n "$weight" ] && printf ' weight %s' "$weight ${direction:+${direction}}" >> "$KEEPALIVED_CONF" printf '\n' >> "$KEEPALIVED_CONF" }