summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
Diffstat (limited to 'init')
-rwxr-xr-xinit2
1 files changed, 1 insertions, 1 deletions
diff --git a/init b/init
index bf22cd3..d7ccb78 100755
--- a/init
+++ b/init
@@ -11,7 +11,7 @@ echo "root:welcome" | chpasswd
hostname=$(</etc/hostname)
# identify which interface is up, then find the ip address
-interface_up=$(ip addr show | grep "state UP" -B2 | head -n1 | awk '{print $2}' | sed 's/://')
+interface_up=$(ip addr show | grep -v "lo: " | grep "state UP" -B2 | head -n1 | awk '{print $2}' | sed 's/://')
ipaddress=$(ip addr show $(interface_up) | grep 'inet ' | awk '{print $2}' | cut -d/ -f1)
# start the ssh daemon