#!/bin/sh -e

# This script requires substitute versions of the following files:
#  /etc/resolv.conf        => /etc/resolv.conf.office
#  /etc/network/interfaces => /etc/network/interfaces.office

# Link resolv.conf up
ln -snf laptop-netconf/resolv.conf.office /etc/resolv.conf

# Link interfaces file up
ln -snf ../laptop-netconf/interfaces.office /etc/network/interfaces

# Restart the ethernet interface
ifup --force eth0 2>/dev/null

# Restart services
/etc/init.d/apache reload >/dev/null 2>&1
/etc/init.d/ssh reload >/dev/null 2>&1
