#!/bin/sh

PATH=/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

for bin_with_path in sbin/ifconfig sbin/route sbin/ip bin/netstat; do
    [ -e "/opt/$bin_with_path" ] && continue
    bin=`echo $bin_with_path | cut -d '/' -f 2`
    found_bin=`which $bin`
    if [ -z "$found_bin" ]; then
	echo "Warning: $bin program not found. Please, install it before using OpenVPN."
	continue
    fi
    ln -s $found_bin /opt/$bin_with_path
done
