Skip to content

Commit

Permalink
Set environment variables for VMware with ip of interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
julien-duponchelle committed Oct 26, 2016
1 parent 77f9212 commit 9d437fe
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
7 changes: 7 additions & 0 deletions config/gns3-ifup
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

command -v vmtoolsd >/dev/null 2>&1 || exit 0

IP=`ifconfig $IFACE | grep 'inet addr:' | cut -d: -f2 | cut -d' ' -f1`

vmtoolsd --cmd "info-set guestinfo.gns3.$IFACE $IP"
5 changes: 5 additions & 0 deletions config/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,8 @@ chown root:root /usr/local/bin/gns3restore
cp bash_profile /home/gns3/.bash_profile
chmod 700 /home/gns3/.bash_profile
chown gns3:gns3 /home/gns3/.bash_profile

# ifup script
cp gns3-ifup /etc/network/if-up.d/gns3-ifup
chmod 755 /etc/network/if-up.d/gns3-ifup
chown root:root /etc/network/if-up.d/gns3-ifup

0 comments on commit 9d437fe

Please sign in to comment.