#/bin/sh
echo "Starting installation of mount-utils..."
make fd0mount
make fd0umount
make fd0chown
make fd1mount
make fd1umount
make fd1chown
make cdmount
make cdumount
mv fd0mount fd0umount fd0chown fd1mount fd1umount fd1chown /usr/bin
mv cdmount cdumount /usr/bin
chown root.root /usr/bin/fd0mount /usr/bin/fd0umount /usr/bin/fd0chown
chown root.root /usr/bin/fd1mount /usr/bin/fd1umount /usr/bin/fd1chown
chown root.root /usr/bin/cdmount /usr/bin/cdumount
chmod u+s /usr/bin/fd0mount /usr/bin/fd0umount /usr/bin/fd0chown
chmod u+s /usr/bin/fd1mount /usr/bin/fd1umount /usr/bin/fd1chown
chmod u+s /usr/bin/cdmount /usr/bin/cdumount
cp *stub /usr/bin
chown root.root /usr/bin/mount-stub /usr/bin/umount-stub /usr/bin/chown-stub

if [ ! -d /fd0 ]; then
	mkdir /fd0
fi
if [ ! -d /fd1 ]; then
	mkdir /fd1
fi
if [ ! -d /cd0 ]; then
	mkdir /cd0
fi
echo "Done with installation of mount-utils..."
