#!/bin/sh

A=$1;
N=$2; # new root fs
S=$3; # source file *.sq or *.tar.gz


#D=`dirname $0`;
#D=${D#$N};

tar xzf $S  --exclude Changelog --exclude Makefile --exclude desc.txt --exclude install --exclude version \
	--exclude Linux_eGTouch_Release_Note.txt --exclude readme.txt -C $N;
grep -q "/opt/bin/eGTouchD" $N/etc/runit/conf/stage1-start.conf || cat << EOF >>$N/etc/runit/conf/stage1-start.conf
[[ ! -d /var/lock/subsys/ ]] && mkdir -p /var/lock/subsys/
touch /var/lock/subsys/local
EOF
#modprobe usbtouchscreen
#/opt/bin/eGTouchD
