| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
|
|
| |
Removed unneeded sleep when taking interface down
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
|
|
| |
This is more in line with Slackware tradition
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Rename rc.inet1.conf options
USE_STATELESS6 -> USE_AUTOCONF6
NETMASK6 -> PREFIX6
* Shell syntax and comment fixes
* Removed some redundant code
* Sleep after loading the network card module to allow it to register
* Added error checking when adding IPs to an interface
* Modify if_down() to bring all types of interface down
* Only do MTU and PROMISC set up if the interface comes up
* No longer skip alias config if using USE_AUTOCONF.
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
|
|
| |
This begins addressing concerns raised in af0a481ef072d220a58e
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
|
|
|
| |
DHCP may have set the MTU to what the DHCP server advertises,
but our override should take precedence.
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
|
|
|
| |
TODO: I (RW) am not convinced that this will behave correctly if the
ipv6 address is static while ipv4 is dynamic, or vice versa.
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
|
|
|
| |
This is needed for container networking - the bridge for it
must be in promiscuous mode.
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Jakub Jankowski <shasta@toxcorp.com>
|
|
|
|
| |
Signed-off-by: Jakub Jankowski <shasta@toxcorp.com>
|
|
|
|
|
|
|
| |
Instead of heavy subshelling, use pkill/pgrep. Also, be a bit more
specific on what we're killing.
Signed-off-by: Jakub Jankowski <shasta@toxcorp.com>
|
|
|
|
|
|
|
|
|
| |
Conditional expression like [ test1 -a test2 ] should be avoided as it
is not well defined.
See http://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html#tag_20_128_16
and https://github.com/koalaman/shellcheck/wiki/SC2166
Signed-off-by: Jakub Jankowski <shasta@toxcorp.com>
|
|
|
|
|
|
|
| |
Instead of "ip | sed", just read the sysfs file in which hardware
address is readily presented for us.
Signed-off-by: Jakub Jankowski <shasta@toxcorp.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There's no need to $(cat .../uevent | grep DEVTYPE) and then compare it
to what we're looking for. grep can do all of it for us ("Useless Use of
Cat").
While at it, if we have three ways of checking whether a device is
wireless, let's order them from least expensive (checking dir is only
one stat()) to most expensive (iwconfig | grep). Proof of correctness:
if "iwconfig | grep" is returning true and the other two methods are
not, we will still reach "iwconfig | grep" in the series of if/elif.
Signed-off-by: Jakub Jankowski <shasta@toxcorp.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
|
|
| |
Thanks to Markus Wiesner.
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
| |
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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/<interface>).
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 <rworkman@slackware.com>
|
|
|
|
|
|
| |
The only places using "num" already clear it with "num=0"
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
|
|
| |
Add same comment as in 4561bd10747935edf3e4f17ad18768d17ee95a4e
Signed-off-by: Robby Workman <rworkman@slackware.com>
|
|
|
|
| |
Signed-off-by: Robby Workman <rworkman@slackware.com>
|