#!/bin/sh # TMP=/tmp/.tun echo "syncing disk" sync model=`cat /etc/model` echo"" echo "Checking your Boxtype...." echo "Some Plugins will not work correctly on your $model!" echo "" if [ "$model" != "ufs910" ]; then echo "Sorry! This Modul is not for your $model !! It will not work correctly !!" echo "Aborting installation..." exit 1 else echo "Boxtype: $model OK" fi if [ -e /lib/modules/tun.ko ]; then echo -------------------------- echo tun.ko allready installed !! echo -------------------------- exit 1 fi if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1 | wc -l` -eq 1 ]; then SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1` FREE=`expr $SPACE - 100` SIZE=12 echo "check freespace" echo packege size $SIZE kb echo freespace size $FREE kb if [ "$FREE" -lt "$SIZE" ]; then echo "sorry no freespace on device" exit 1 else echo ok fi fi echo "install tun.ko ..." buildgroup=`cat /etc/.buildgroup` echo "checking OS" if [ `cat /etc/motd | grep $buildgroup | grep M | grep rev | wc -l` -eq 0 ]; then echo --------------------------- echo DONT USE this IPK Package!! echo --- echo Only for $buildgroup Image!! echo --------------------------- exit 1 fi exit 0