#!/bin/sh

echo "patch issues.net to ****   The Gemini Plugin 3.3   ****"

TRAGET=`cat /etc/issue.net | grep -c "opendreambox"`
if [ $TRAGET -eq 0 ]
then
LINE="opendreambox 2.2.0 %h"
else
LINE=`cat /etc/issue.net | grep "opendreambox"`
fi

TRAGET=`cat /etc/issue.net | grep  -c "Gemini"`
if [ $TRAGET -eq 0 ]
then
	echo "*****************************" > /etc/issue.net
	echo "*                           *" >> /etc/issue.net
	echo "*   The Gemini Plugin 3.3   *" >> /etc/issue.net
	echo "*                           *" >> /etc/issue.net
	echo "*****************************" >> /etc/issue.net
	echo "" >> /etc/issue.net
	echo $LINE  >> /etc/issue.net
	echo "" >> /etc/issue.net
fi

touch /root/.profile
chmod 0660 /root/.profile

TRAGET=`cat /root/.profile | grep -c "TERM=xterm"`
if [ $TRAGET -eq 0 ]
then
	echo "TERM=xterm" >> /root/.profile
fi


TRAGET=`cat /root/.profile | grep -c 'alias ls="ls --color"'`
if [ $TRAGET -eq 0 ]
then
	echo 'alias ls="ls --color"' >> /root/.profile
fi

source /root/.profile

exit 0
