Stuart Henderson <[email protected]> wrote:
> > > .Nm
> > > will hash the nwid along with the passphrase to create the key.
> > > +If a passphrase contains one or more whitespaces, it can be surrounded
> > > +by double quotes.
>
> The same applies for nwid, pppoekey, descr, pass (carp).
>
> The place this is needed is hostname.if(5) where it's not clear whether
> normal shell rules apply, and it is already mentioned there (and used in
> an example).
Right. It already contains a pretty nice example of the worst case:
Arguments containing either whitespace or single quote characters must be
double quoted. For example:
inet 10.0.0.1 255.255.255.0 10.0.0.255 description "Bob's uplink"
Each line is processed separately and in order. For example:
join mynwid wpakey mywpakey
inet6 autoconf
inet autoconf
would run ifconfig three times to add a wireless network using WPA to the
join list and enable dynamic address configuration for IPv6 and IPv4.
ifconfig itself is a minor case of this. Obviously you need quoting.
Otherwise how would a command know the difference between
wpkakey 123 abc
and
wpkakey 123 abc
and
wpkakey 123 abc
(^spaces at the end)
This is Unix 101.