On 2020/01/05 22:36, Matt Kunkel wrote:
> Backslash characters inside hostname.if cause it to differ from 
> parameters provided to ifconfig. Adding '-r' to eliminate the need to
> escape '\' inside hostname.if (ssid/wpa key material). If this has 
> unintended consequences, I can provide a hostname.if man patch 
> (currently an un-documented "feature").
> 
> diff --git etc/netstart etc/netstart
> index 8cfa7bbf9b9..4168d3634d1 100644
> --- etc/netstart
> +++ etc/netstart
> @@ -134,7 +134,7 @@ ifstart() {
>       # Parse the hostname.if(5) file and fill _cmds array with interface
>       # configuration commands.
>       set -o noglob
> -     while IFS= read -- _line; do
> +     while IFS= read -r -- _line; do
>               parse_hn_line $_line
>       done <$_hn
>  
> 

Changing to use -r breaks existing configurations which use \ for a
continuation line This isn't documented in hostname.if(5) but is used
in examples in e.g. carp(4).

Reply via email to