<feed xmlns='http://www.w3.org/2005/Atom'>
<title>slacknetsetup, branch current-20180318</title>
<subtitle>Migration to iproute2-based network setup</subtitle>
<link rel='alternate' type='text/html' href='https://git.rlworkman.net/slacknetsetup/'/>
<entry>
<title>rc.inet1: set the bcast addr and flush ip addr on shutdown</title>
<updated>2018-03-18T08:51:23+00:00</updated>
<author>
<name>Robby Workman</name>
<email>rworkman@slackware.com</email>
</author>
<published>2018-03-18T08:51:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rlworkman.net/slacknetsetup/commit/?id=1aeadff67ff0df3efb8d49cf8c2a29b46bf12ce5'/>
<id>1aeadff67ff0df3efb8d49cf8c2a29b46bf12ce5</id>
<content type='text'>
Thanks to Markus Wiesner.

Signed-off-by: Robby Workman &lt;rworkman@slackware.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Thanks to Markus Wiesner.

Signed-off-by: Robby Workman &lt;rworkman@slackware.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>netconfig: Don't write hostname to NM config file any more</title>
<updated>2018-03-18T08:49:36+00:00</updated>
<author>
<name>Andrzej Telszewski</name>
<email>atelszewski@gmail.com</email>
</author>
<published>2018-03-18T08:49:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rlworkman.net/slacknetsetup/commit/?id=663453e3e0136ad9ae0a4b5c9c67c535af9b8995'/>
<id>663453e3e0136ad9ae0a4b5c9c67c535af9b8995</id>
<content type='text'>
Signed-off-by: Robby Workman &lt;rworkman@slackware.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Robby Workman &lt;rworkman@slackware.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>manpages/*: Sync with public -current tree</title>
<updated>2018-03-18T08:40:07+00:00</updated>
<author>
<name>Robby Workman</name>
<email>rworkman@slackware.com</email>
</author>
<published>2018-03-18T08:37:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rlworkman.net/slacknetsetup/commit/?id=137657f6d9683cbc7d13840099e55cc52c68d5e9'/>
<id>137657f6d9683cbc7d13840099e55cc52c68d5e9</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>rc.inet1: Fix typo ( $1 --&gt; $i )</title>
<updated>2017-11-27T05:09:14+00:00</updated>
<author>
<name>Jakub Jankowski</name>
<email>shasta@toxcorp.com</email>
</author>
<published>2017-11-27T05:09:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rlworkman.net/slacknetsetup/commit/?id=7a0cbb9ec6ce5867e6c8be5a59a3066adc76ee13'/>
<id>7a0cbb9ec6ce5867e6c8be5a59a3066adc76ee13</id>
<content type='text'>
Signed-off-by: Robby Workman &lt;rworkman@slackware.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Robby Workman &lt;rworkman@slackware.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>netconfig: Add back a dropped "."</title>
<updated>2017-11-26T20:38:41+00:00</updated>
<author>
<name>Robby Workman</name>
<email>rworkman@slackware.com</email>
</author>
<published>2017-11-26T20:38:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rlworkman.net/slacknetsetup/commit/?id=ad9786366e1c2ac2e3f9ad2ad6eae851c2f943fb'/>
<id>ad9786366e1c2ac2e3f9ad2ad6eae851c2f943fb</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>rc.inet1: Check for iface in /sys/class/net, not /proc/net/dev</title>
<updated>2017-11-21T06:07:59+00:00</updated>
<author>
<name>Jakub Jankowski</name>
<email>shasta@toxcorp.com</email>
</author>
<published>2017-11-21T02:57:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rlworkman.net/slacknetsetup/commit/?id=d0c9d92192a208a4f76ffd7a9e2a580a48698c50'/>
<id>d0c9d92192a208a4f76ffd7a9e2a580a48698c50</id>
<content type='text'>
There is a slight problem with things like
  grep lo: /proc/net/dev
especially with tun/tap devices with can have arbitrary names.

Consider a scenario where you name your tap iface "trololo":
$ grep -c lo: /proc/net/dev
2
$

To fix this (quite hypothetical, but still) problem, instead
of simple grepping in /proc/net/dev, check of sysfs path
existence (/sys/class/net/&lt;interface&gt;).

Same fix in if_up() and if_down() for non-loopback interfaces.

While there, also strip colon-whatever from interface name
(what I think was the original idea behind a construct like
grep $(echo ${1}: | cut -f 1 -d :): /proc/net/dev) by using
parameter expansion: ${1%%:*} will remove the longest suffix
matching ":*", ie. colon-and-everything-after.
This is supported by POSIX:
http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html

Alternative solution would be to change the grep pattern to
  grep '^ *lo:' /proc/net/dev

Signed-off-by: Robby Workman &lt;rworkman@slackware.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is a slight problem with things like
  grep lo: /proc/net/dev
especially with tun/tap devices with can have arbitrary names.

Consider a scenario where you name your tap iface "trololo":
$ grep -c lo: /proc/net/dev
2
$

To fix this (quite hypothetical, but still) problem, instead
of simple grepping in /proc/net/dev, check of sysfs path
existence (/sys/class/net/&lt;interface&gt;).

Same fix in if_up() and if_down() for non-loopback interfaces.

While there, also strip colon-whatever from interface name
(what I think was the original idea behind a construct like
grep $(echo ${1}: | cut -f 1 -d :): /proc/net/dev) by using
parameter expansion: ${1%%:*} will remove the longest suffix
matching ":*", ie. colon-and-everything-after.
This is supported by POSIX:
http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html

Alternative solution would be to change the grep pattern to
  grep '^ *lo:' /proc/net/dev

Signed-off-by: Robby Workman &lt;rworkman@slackware.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rc.inet1: Remove unnecessary unset num</title>
<updated>2017-11-21T06:07:59+00:00</updated>
<author>
<name>Jakub Jankowski</name>
<email>shasta@toxcorp.com</email>
</author>
<published>2017-11-21T01:53:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rlworkman.net/slacknetsetup/commit/?id=96cba49d10f8cd7c50bd20b21203fd6277ea3257'/>
<id>96cba49d10f8cd7c50bd20b21203fd6277ea3257</id>
<content type='text'>
The only places using "num" already clear it with "num=0"

Signed-off-by: Robby Workman &lt;rworkman@slackware.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The only places using "num" already clear it with "num=0"

Signed-off-by: Robby Workman &lt;rworkman@slackware.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>netconfig: Add comment to netconfig-generated rc.inet1.conf</title>
<updated>2017-11-21T06:07:59+00:00</updated>
<author>
<name>Jakub Jankowski</name>
<email>shasta@toxcorp.com</email>
</author>
<published>2017-11-21T03:13:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rlworkman.net/slacknetsetup/commit/?id=2fe6ebae0398a1bf67b839e20e5e87b979de547a'/>
<id>2fe6ebae0398a1bf67b839e20e5e87b979de547a</id>
<content type='text'>
Add same comment as in 4561bd10747935edf3e4f17ad18768d17ee95a4e

Signed-off-by: Robby Workman &lt;rworkman@slackware.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add same comment as in 4561bd10747935edf3e4f17ad18768d17ee95a4e

Signed-off-by: Robby Workman &lt;rworkman@slackware.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rc.inet1: Factor DEBUG_ETH_UP logging to a separate function</title>
<updated>2017-11-21T06:07:59+00:00</updated>
<author>
<name>Jakub Jankowski</name>
<email>shasta@toxcorp.com</email>
</author>
<published>2017-11-21T02:38:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rlworkman.net/slacknetsetup/commit/?id=c9a17f15501f539c49372ab99fe5484664f756e0'/>
<id>c9a17f15501f539c49372ab99fe5484664f756e0</id>
<content type='text'>
Signed-off-by: Robby Workman &lt;rworkman@slackware.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Robby Workman &lt;rworkman@slackware.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rc.inet1: Use ${array[*]} not ${array[@]} to produce a string</title>
<updated>2017-11-21T06:07:59+00:00</updated>
<author>
<name>Jakub Jankowski</name>
<email>shasta@toxcorp.com</email>
</author>
<published>2017-11-21T02:32:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rlworkman.net/slacknetsetup/commit/?id=e21625c5bb1b03cad355590021c95009ab4246c5'/>
<id>e21625c5bb1b03cad355590021c95009ab4246c5</id>
<content type='text'>
This is the correct usage to produce one string from all
elements of an array.

foo[0]=b
foo[1]=a
foo[2]=r

"${foo[@]}" here would mean "b" "a" "r"
"${foo[*]}" however: "b a r", and that's what we mean when
logging it.

Signed-off-by: Robby Workman &lt;rworkman@slackware.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is the correct usage to produce one string from all
elements of an array.

foo[0]=b
foo[1]=a
foo[2]=r

"${foo[@]}" here would mean "b" "a" "r"
"${foo[*]}" however: "b a r", and that's what we mean when
logging it.

Signed-off-by: Robby Workman &lt;rworkman@slackware.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
