#!/bin/sh
#
# stage2 (c) 1997-2004 Petter N Hagen
# part of ntchangepasswd bootdisk scripts
#
# After initial initrd has copied itself out and
# detached from the console devices
#

echo "In stage 2"

exec </dev/console >/dev/console 2>/dev/console

#echo "Redirect done, umount old ramdisk"

#umount /initrd
#freeramdisk /dev/root

/bin/udevstart

echo "Spawning shells on console 2 - 6"
# Stupid busybox insists on using /dev/tty? on openvt
# and we just have /dev/vc/?

for i in 1 2 3 4 5 6
do
#    ln -s /dev/vc/$i /dev/tty$i
    case $i in
       1) ;;
       *) openvt $i sh
    esac
done

mkdir /tmp /disk
chmod 777 /tmp

echo "Initialization complete!"
cat /scripts/banner1
sh /scripts/main.sh

sh

echo "Shell exit off end.. hasta.."

