#!/bin/sh
#
# fdisk, a wrapper to use the right fdisk on Linux/powerpc
# Copyright (C) 1998, Hartmut Koptein <koptein@et-inf.fho-emden.de>
# 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.
#
# 20. Aug 98 Hartmut Koptein <koptein@et-inf.fho-emden.de>
#            First version for the debian root disc on powerpc
#

if [ -f /proc/cpuinfo ]
then
	
	Arch=""
	Arch=`awk '/machine/{ print $3 }' /proc/cpuinfo`

	case "$Arch" in
		CHRP)
# if CHRP IBM,LongTrail-2 
			/sbin/dos-fdisk $@
			exit 0
			;;
		PowerMac)	
# if Power-Mac
			/sbin/pmac-fdisk $@
			exit 0
			;;
		PReP)	
# if Prep like RS-6000
                        /sbin/dos-fdisk $@
                        exit 0
                        ;;
# else... APUS ????
		*)
			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
