#!/bin/sh

mv /home/root/.xinitrc /home/root/.xinitrc.mb

if [ -x /mnt/card/home/root/.xinitrc.fvwm ] ; then
  ln -s /mnt/card/home/root/.xinitrc.fvwm /home/root/.xinitrc
elif [ -x /mnt/cf/home/root/.xinitrc.fvwm ] ; then
  ln -s /mnt/cf/home/root/.xinitrc.fvwm /home/root/.xinitrc
elif [ -x /home/root/.xinitrc.fvwm ] ; then
  mv /home/root/.xinitrc.fvwm /home/root/.xinitrc
else
  mv /home/root/.xinitrc.mb /home/root/.xinitrc
  exit 1
fi
touch /home/root/.fvwm/welcome.runonce

echo ""
echo "Quit from X and execute startx to begin using Fvwm."
echo "If you remove this package, it restores your original window manager."
echo "Replacing the window manager with Fvwm..."

