#!/usr/bin/bash

# when you boot your PC, you easily choose msdos or linux
# use lilo or grub or else
# and call this script with kernel cmdline init=<PATH>msdos
# you end up with a full dosbox, for slackware
#
# see for file dosbox-x.conf in the same directory

/etc/rc.d/rc.S
/etc/rc.d/rc.M
bash /etc/rc.d/rc.pulseaudio start
cat << EoT
 __  __ ____        ____            
|  \\/  / ___|      |  _ \\  ___  ___ 
| |\\/| \\___ \\ _____| | | |/ _ \\/ __|
| |  | |___) |_____| |_| | (_) \\__ \\
|_|  |_|____/      |____/ \\___/|___/

        ____             ____                  _  __
       / __ \\____  _____/ __ )____  _  __     | |/ /
      / / / / __ \\/ ___/ __  / __ \\| |/_/_____|   / 
     / /_/ / /_/ (__  ) /_/ / /_/ />  </_____/   |  
    /_____/\\____/____/_____/\\____/_/|_|     /_/|_|  

EoT
echo -n "Ready ? "
set -x
XDG_RUNTIME_DIR=/dev/shm
export XDG_RUNTIME_DIR
SDL_VIDEODRIVER=kmsdrm
export SDL_VIDEODRIVER
dosbox-x -conf /etc/dosbox-x/dosbox-x.conf 2>&1 > /var/log/msdosbox.log

mount -o remount,ro /
poweroff -d -f
