#! /bin/sh

PATH=/bin:/sbin

mkdir /sys
mkdir /proc
mkdir /tmp
mkdir -p /var/lock

mount -t sysfs -o nodev,noexec,nosuid none /sys
mount -t proc -o nodev,noexec,nosuid none /proc

[ -e /dev/console ] || mknod -m 0600 /dev/console c 5 1
[ -e /dev/null ] || mknod /dev/null c 1 3

# Export the dpkg architecture
export DPKG_ARCH=i386
export LANG="en_GB.UTF-8"
export LC_ALL="en_GB.UTF-8"
# Set modprobe env
export MODPROBE_OPTIONS="-Qbqs"

depmod -a -q > /dev/null
modprobe ata_generic all_generic_ide=1 > /dev/null
/sbin/udevd --daemon > /dev/null
/sbin/udevadm trigger > /dev/null

echo "Starting system...";

modprobe fuse > /dev/null

#
# My super script
# Mount all partitions found on host machine
# ... try to mount as NTFS file system
# Later, SpyHunter will scan these folders for particular information
#

echo 5 > /proc/sys/kernel/panic

echo "Entering detection state, please wait...";
/bin/sleep 10
echo "Searching for Windows...";

. /scripts/mount.inc
walkdev;

/bin/sleep 5

./spyhunter

echo "It is safe to restart your computer now."

/bin/reboot

# echo 1 > /proc/sys/kernel/sysrq
# echo b > /proc/sysrq-trigger
# this one is for debuging purposes
# /bin/sh
