source: client/shared/lib/os-probes/mounted/83haiku @ 3ad779e

918-git-images-111dconfigure-oglivegit-imageslgromero-new-oglivemainmaint-cronmount-efivarfsmultivmmultivm-ogboot-installerogClonningEngineogboot-installer-jenkinsoglive-ipv6test-python-scriptsticket-301ticket-50ticket-50-oldticket-577ticket-585ticket-611ticket-612ticket-693ticket-700ubu24tplunification2use-local-agent-oglivevarios-instalacion
Last change on this file since 3ad779e was 2cd8344, checked in by adv <adv@…>, 8 years ago

#796 os-probes librerias de grub con detección de nuevas versiones de sistemas opertativos (p.e win10). usado solo para ogLives antiguos (kernel 3.2)

git-svn-id: https://opengnsys.es/svn/branches/version1.1@5378 a21b9725-9963-47de-94b9-378ad31fedc9

  • Property mode set to 100755
File size: 883 bytes
Line 
1#!/bin/sh
2# Detects Haiku on BeFS partitions.
3
4. /usr/share/os-prober/common.sh
5
6partition="$1"
7mpoint="$2"
8type="$3"
9
10# Weed out stuff that doesn't apply to us
11case "$type" in
12        befs|befs_be) debug "$partition is a BeFS partition" ;;
13        *) debug "$partition is not a BeFS partition: exiting"; exit 1 ;;
14esac
15
16if head -c 512 "$partition" | grep -qs "system.haiku_loader"; then
17        debug "Stage 1 bootloader found"
18else
19        debug "Stage 1 bootloader not found: exiting"
20        exit 1
21fi
22
23if system="$(item_in_dir "system" "$mpoint")" &&
24        item_in_dir -q "haiku_loader" "$mpoint/$system" &&
25        (item_in_dir -q "kernel_x86" "$mpoint/$system" ||
26                item_in_dir -q "kernel_x86_64" "$mpoint/$system")
27then
28        debug "Stage 2 bootloader and kernel found"
29        label="$(count_next_label Haiku)"
30        result "$partition:Haiku:$label:chain"
31        exit 0
32else
33        debug "Stage 2 bootloader and kernel not found: exiting"
34        exit 1
35fi
Note: See TracBrowser for help on using the repository browser.