summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Jankowski <shasta@toxcorp.com>2017-11-21 02:29:57 +0100
committerRobby Workman <rworkman@slackware.com>2017-11-21 00:07:59 -0600
commit230e46830f5d6915c8203c6e75497973ac48bc8c (patch)
treea289770257dd90066eec116bdb37077593e32bd6
parentbe0ed30d63f9a374c7e5df200b517fb46322a636 (diff)
downloadslacknetsetup-230e46830f5d6915c8203c6e75497973ac48bc8c.tar.xz
rc.inet1: Test for loopback being "state UNKNOWN" too.
On my system "ip link set dev lo up" does not put it into UP state, but rather UNKNOWN. So test for either when trying to decide whether we need to set it up. Signed-off-by: Robby Workman <rworkman@slackware.com>
-rw-r--r--rc.inet12
1 files changed, 1 insertions, 1 deletions
diff --git a/rc.inet1 b/rc.inet1
index 3c9d5c2..6b88d2a 100644
--- a/rc.inet1
+++ b/rc.inet1
@@ -51,7 +51,7 @@ fi
# already up, do nothing.
lo_up() {
if grep lo: /proc/net/dev 1> /dev/null ; then
- if ! /sbin/ip link show dev lo | grep -wq "state UP" ; then
+ if ! /sbin/ip link show dev lo | grep -wq -e "state UP" -e "state UNKNOWN" ; then
echo "/etc/rc.d/rc.inet1: /sbin/ip address add 127.0.0.1/8 dev lo" | $LOGGER
/sbin/ip address add 127.0.0.1/8 dev lo
/sbin/ip link set dev lo up