Skip to content

Commit

Permalink
Support systemd to collect network info in a nicer way
Browse files Browse the repository at this point in the history
Remove unwanted lines from traditional network info
  • Loading branch information
schlomo committed Feb 15, 2019
1 parent c7c7ff9 commit 4c4f0c6
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions xsession.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,18 @@ done
echo "Welcome to the Kiosk Browser (http://github.com/schlomo/kiosk-browser)"
echo
echo "This is $(uname -n)"
ip a
ip route
cat /etc/resolv.conf
perl -e '$/ = undef; $d=<>; $d =~ m/.*(lease {.*?})$/s ; print $1' $(ps ax | grep dhclient | sed -ne "s/.* \(\/[^ ]\+\.lease[s]\?\).*/\1/p") <<<""
echo
if type -p networkctl &>/dev/null ; then
networkctl status
else
ip a | grep -E 'UP|inet'
echo
ip route
echo
sed -e '/^#/d;/^$/d' /etc/resolv.conf
fi
echo
perl -e '$/ = undef; $d=<>; $d =~ m/.*(lease \{.*?\})$/s ; print $1' $(ps ax | grep dhclient | sed -ne "s/.* \(\/[^ ]\+\.lease[s]\?\).*/\1/p") <<<""
echo
echo "This message will self-destruct in 60 seconds"
} | osd_cat --pos bottom --align left --colour green --outline 2 --font 10x20 --lines 50 --delay 60 &
Expand Down

0 comments on commit 4c4f0c6

Please sign in to comment.