#!/bin/bash
#yast lan 
#yast x11

#ifconfig eth0 192.168.0.4
#route add default gw 192.168.0.1
dhcpcd -k eth0
dhcpcd eth0
#if ! /bin/cat /etc/fstab|grep shm  ;then
#    echo 'shm 	/dev/shm	tmpfs	size=52488000,nodev,nosuid,noexec   0 0' >> /etc/fstab

#fi
tar -zpPxvf $1 
sync
tar -zpPxvf /opt/appsrv/cfg/gtmpos.tgz
tar -zpPxvf /opt/appsrv/cfg/elpos.tgz
tar -zpPxvf /opt/appsrv/cfg/systar.tgz
tar -zpPxvf /opt/appsrv/cfg/apr.tgz

#install ttf microsoft fonts 
tar -zpPxvf /opt/appsrv/cfg/ttffonts.tgz
/usr/sbin/fonts-config
##########

#tar -zpPxvf /pos/cfg/systar.tgz 
#tar -zpPxvf /pos/cfg/elpos.tgz
#tar -zpPxvf /pos/cfg/tz.tgz
## for msm shared lim mjsp
ln -s /lib64/libncurses.so.5 /lib64/libtinfo.so.5
ldconfig
##disable ipv6 
echo "alias net-pf-10 off"  >> /etc/modprobe.conf.local
echo "alias ipv6 off"  >> /etc/modprobe.conf.local
###
########## xdot can control and move windows on X ###########
rpm -ivh /opt/appsrv/cfg/rpm/xdotool-2.2012+git.20130201.65cb0b1-2.1.x86_64.rpm
#
# for tsb.sh mishkal tcp to serial
rpm -ivh /opt/appsrv/utils/python-serial-2.4-6.1.x86_64.rpm
#rpm -ivh /pos/cfg/rpm/cabextract*
#rpm -ivh /pos/cfg/rpm/fetchmsttfonts*
#sh /var/adm/update-scripts/fetchmsttfonts-11.0-2.3-1

chkconfig -s SuSEfirewall2_setup off
chkconfig -s SuSEfirewall2_init off
chkconfig -s alsasound off
chkconfig -s auditd off
chkconfig -s bluez-coldplug off
chkconfig -s cups off
chkconfig -s network-remotefs off
chkconfig -s nfs off
chkconfig -s  postfix off
chkconfig -s smbfs off

#chkconfig -s tomcat6 on 
chkconfig -s msmserver on 

yast runlevel delete service=boot.apparmor

#
#	rpm -ivh /opt/appsrv/cfg/rpm/kernel-3.0.101EETI_170316_63_default-1.x86_64.rpm
	rpm -ivh /opt/appsrv/cfg/rpm/kernel-3.19.8ELPOS_63_default-1.x86_64.rpm
	tar -zpPxvf /opt/appsrv/cfg/touchkit.tgz
	/usr/sbin/grub-install
if  /usr/sbin/lsusb|grep "0eef" > /dev/null ;then

        tar -zpPxvf /opt/appsrv/cfg/touchsenor.tgz 
elif /usr/sbin/lsusb |grep 222a > /dev/null;then
	tar -zpPxvf /opt/appsrv/cfg/ILITEK_TOUCH.tgz
	rpm -ivh /opt/appsrv/cfg/rpm/xinput_calibrator-1361041250-20.2-x86_64.rpm
	 
else
	tar -zpPxvf /opt/appsrv/cfg/elotch.tgz 
        rpm -ivh /opt/appsrv/cfg/rpm/openmotif22-libs-2.2.4-189.1.x86_64.rpm
fi
