#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include "config.h"

main(){
  int iret;
 
  setuid((uid_t) 0);
  iret = system(INSTPATH "/mount-stub -t ext2 -o user /dev/fd0 /fd0 2>> /dev/zero"); 
  if (iret) iret = system(INSTPATH "/mount-stub -t msdos -o user /dev/fd0 /fd0 2>> /dev/zero");
  if (iret) iret = system(INSTPATH "/mount-stub -t minix -o user /dev/fd0 /fd0 2>> /dev/zero");
  if (iret) iret = system(INSTPATH "/mount-stub -t ext2 /dev/fd0 -o ro,user /fd0 2>> /dev/zero");
  if (iret) iret = system(INSTPATH "/mount-stub -t msdos /dev/fd0 -o ro,user /fd0 2>> /dev/zero");
  if (iret) iret = system(INSTPATH "/mount-stub -t minix /dev/fd0 -o ro,user /fd0 2>> /dev/zero");
  if (iret) fprintf(stderr,"fd0 is neither EXT2 nor MSDOS nor MINIX...\n");
  return (iret);
}
