Skip to content

Commit d566c8b

Browse files
committed
Don't break sentences into multiple log messages
1 parent 7438621 commit d566c8b

File tree

3 files changed

+22
-14
lines changed

3 files changed

+22
-14
lines changed

tailscale/rootfs/etc/s6-overlay/s6-rc.d/mss-clamping/run

+3-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ readarray -t routes < <(subnet-routes advertised)
1515
# If user later enables subnet routing for site-to-site networking, these settings are already there
1616
# Source: https://tailscale.com/kb/1214/site-to-site/ Step 1 / Point 4
1717
if (( 0 < ${#routes[@]} )); then
18-
bashio::log.info "Clamping the MSS to the MTU for all advertised subnet's interface,"
19-
bashio::log.info "to support site-to-site networking better"
18+
bashio::log.info \
19+
"Clamping the MSS to the MTU for all advertised subnet's interface," \
20+
"to support site-to-site networking better"
2021

2122
# Find interfaces for subnet routes
2223
for route in "${routes[@]}"; do

tailscale/rootfs/etc/s6-overlay/s6-rc.d/post-tailscaled/run

+13-8
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,12 @@ then
155155
| jq -rc '.Peer[] | select(has("PrimaryRoutes")) | .PrimaryRoutes[]' \
156156
| sort -u))
157157
if (( 0 < ${#colliding_routes[@]} )); then
158-
bashio::log.warning "Currently the following subnets are both present as local subnets"
159-
bashio::log.warning "and are also routed within your tailnet to other nodes!"
160-
bashio::log.warning "Please reconfigure your subnet routing within your tailnet"
161-
bashio::log.warning "to prevent current or future collisions."
158+
bashio::log.warning \
159+
"Currently the following subnets are both present as local subnets" \
160+
"and are also routed within your tailnet to other nodes!"
161+
bashio::log.warning \
162+
"Please reconfigure your subnet routing within your tailnet" \
163+
"to prevent current or future collisions."
162164
fi
163165
for route in "${colliding_routes[@]}"; do
164166
bashio::log.warning " ${route}"
@@ -169,8 +171,11 @@ fi
169171
if ! bashio::config.has_value "userspace_networking" || \
170172
bashio::config.true "userspace_networking";
171173
then
172-
bashio::log.notice "The add-on uses userspace networking mode."
173-
bashio::log.notice "If you need to access other clients on your tailnet from your Home Assistant instance,"
174-
bashio::log.notice "disable userspace networking mode, that will create a \"tailscale0\" network interface on your host."
175-
bashio::log.notice "Please check your configuration based on the add-on's documentation under \"Option: userspace_networking\""
174+
bashio::log.notice \
175+
"The add-on uses userspace networking mode."
176+
bashio::log.notice \
177+
"If you need to access other clients on your tailnet from your Home Assistant instance," \
178+
"disable userspace networking mode, that will create a \"tailscale0\" network interface on your host."
179+
bashio::log.notice \
180+
"Please check your configuration based on the add-on's documentation under \"Option: userspace_networking\""
176181
fi

tailscale/rootfs/usr/bin/protect-subnet-routes

+6-4
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,17 @@ then
3131
fi
3232

3333
readarray -t routes < <(subnet-routes local)
34-
bashio::log.info "Adding local subnets to ip rules with higher priority than Tailscale's routing,"
35-
bashio::log.info "to prevent routing local subnets if the same subnet is routed within your tailnet."
34+
bashio::log.info \
35+
"Adding local subnets to ip rules with higher priority than Tailscale's routing," \
36+
"to prevent routing local subnets if the same subnet is routed within your tailnet."
3637
if (( 0 == ${#routes[@]} )); then
3738
# Do not remove this warning, usually this is superfluous,
3839
# but I've run into situation where Supervisor needed a restart to return valid interface address data
3940
# (that seems to be a hard to reproduce bug, better have some log in the future than not).
4041
# See: https://github.com/home-assistant/supervisor/issues/5361
41-
bashio::log.warning " There are no local subnets to protect!"
42-
bashio::log.warning " Maybe this is a temporary situation due to configuration change underway."
42+
bashio::log.warning \
43+
" There are no local subnets to protect!" \
44+
"Maybe this is a temporary situation due to configuration change underway."
4345
else
4446
for route in "${routes[@]}"; do
4547
if [[ "${route}" =~ .*:.* ]]; then

0 commit comments

Comments
 (0)