#!/bin/sh
#
# fdisk, a wrapper to use the right fdisk on Linux/m68k
# Copyright (C) 1996,1997, Michael Schlueter <schlue00@marvin.informatik.uni-dortmund.de>
# Copyright (C) 1997, James Troup <jjtroup@comp.brad.ac.uk> 
# Copyright (C) 1997, Sven Rudolph <sr1@os.inf.tu-dresden.de>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with your Debian GNU/Linux system, in
# /usr/doc/copyright/GPL.gz; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# 16. Oct 96 Michael Schlueter <schlue00@marvin.informatik.uni-dortmund.de>
#            First version for the debian root disc
# 09. Jun 97 Michael Schlueter <schlue00@marvin.informatik.uni-dortmund.de>
#            Now reading model name into arch before choosing what fdisk
#            we should use.
# 02. Mar 98 Now pfdisk is called mac-fdisk
#

if [ -f /proc/hardware ]
then

	Arch=""

	Arch=`cat /proc/hardware | ( read line; set -- $line; 
	      if [ "$1" = "Model:" ]; then echo $2 ; fi)`

	case "$Arch" in
# if Atari
		Atari)
			/sbin/atari-fdisk $@
			exit 0
			;;
# if Amiga
		Amiga)
			/sbin/amiga-fdisk $@
			exit 0
			;;
# if Macintosh
		Macintosh)
			/sbin/mac-fdisk $@
			exit 0
			;;
# else...
		*)
			echo $0": Your system is not supported yet" 2>&1
			exit 1
			;;
	esac
else
	echo $0": Wrong architecture for this fdisk" 1>&2
	exit 1
fi

#end
