Bug#590897: (Extended) BeOS detection for os-prober
Package: os-prober
Version: 1.39ppa1
Severity: normal
Tags: patch
As promised: 83BeOS; a BeOS os-prober module
Tested with a fresh installation of BeOS R5.
(Send with reportbug, so I wonder if the double dot is back.)
-- System Information:
Debian Release: squeeze/sid
APT prefers maverick-updates
APT policy: (500, 'maverick-updates'), (500, 'maverick-security'), (500, 'maverick')
Architecture: i386 (i686)
Kernel: Linux 2.6.35-25-generic (SMP w/1 CPU core)
Locale: LANG=en_IE.utf8, LC_CTYPE=en_IE.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages os-prober depends on:
ii libc6 2.12.1-0ubuntu10.2 Embedded GNU C Library: Shared lib
os-prober recommends no packages.
os-prober suggests no packages.
-- no debconf information
#!/bin/sh
# Detects BeOS on BeFS partitions.
.. /usr/share/os-prober/common.sh
partition="$1"
mpoint="$2"
type="$3"
# Weed out stuff that doesn't apply to us
case "$type" in
befs) debug "$partition is a BeFS partition" ;;
*) debug "$partition is not a BeFS partition: exiting"; exit 1 ;;
esac
if head -c 512 "$partition" | grep -qs "Error loading OS"; then
debug "Stage 1 bootloader found"
else
debug "Stage 1 bootloader not found: exiting"
exit 1
fi
if beos="$(item_in_dir "beos" "$mpoint")" &&
system="$(item_in_dir "system" "$mpoint/$beos")" &&
item_in_dir -q "zbeos" "$mpoint/$beos/$system" &&
item_in_dir -q "kernel_intel" "$mpoint/$beos/$system"
then
debug "Stage 2 bootloader and kernel found"
label="$(count_next_label BeOS)"
result "$partition:BeOS:$label:chain"
exit 0
else
debug "Stage 2 bootloader and kernel not found: exiting"
exit 1
fi
Reply to: