File: postinst

package info (click to toggle)
mac-fdisk 0.1-1
  • links: PTS
  • area: main
  • in suites: hamm, slink
  • size: 344 kB
  • ctags: 814
  • sloc: ansic: 5,745; makefile: 100; sh: 23
file content (34 lines) | stat: -rw-r--r-- 587 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#! /bin/sh
set -e

#
# make symlink /sbin/fdisk point to the native fdisk
#

# This is also true if /sbin/fdisk is a dangling symlink; in that case we
# want to update the link, too.
if [ ! -e /sbin/fdisk ]; then
	machine=""
	case `awk '$1 == "Model:" { print $2 }' /proc/hardware` in
		Atari)
			machine=atari
			;;
		Amiga)
			machine=amiga
			;;
		Macintosh)
			machine=mac
			;;
		Motorola) # MVME
			;;
	esac
	if [ -n "$machine" -a -f /sbin/$machine-fdisk ]; then
		ln -sf $machine-fdisk /sbin/fdisk
	else
		echo "No native fdisk for this machine type!"
	fi
fi

#DEBHELPER#

exit 0