source: client/shared/lib/os-probes/mounted/40lsb @ b7bed1c

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 b7bed1c 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: 891 bytes
Line 
1#!/bin/sh
2# Test for LSB systems.
3set -e
4
5. /usr/share/os-prober/common.sh
6
7partition="$1"
8dir="$2"
9type="$3"
10
11lsb_field () {
12        file="$1"
13        field="$2"
14        grep ^"$field" "$file" | cut -d = -f 2 | sed 's/^"//' | sed 's/"$//' | sed 's/:/ /g'
15}
16
17file="$dir/etc/lsb-release"
18if [ ! -e "$file" ]; then
19        exit 1
20fi
21
22release=$(lsb_field "$file" DISTRIB_RELEASE)
23if [ -z "$release" ]; then
24        release=$(lsb_field "$file" DISTRIB_CODENAME)
25fi
26description=$(lsb_field "$file" DISTRIB_DESCRIPTION)
27if [ -z "$description" ]; then
28        description=$(lsb_field "$file" DISTRIB_CODENAME)
29fi
30
31if [ -n "$description" ]; then
32        if [ -n "$release" ]; then
33                long="$description ($release)"
34        else
35                long="$description"
36        fi
37else
38        exit 1
39fi
40
41short=$(lsb_field "$file" DISTRIB_ID | sed 's/ //g')
42if [ -z "$short" ]; then
43        short="UnknownLSB"
44fi
45
46label="$(count_next_label "$short")"
47result "$partition:$long:$label:linux"
48exit 0
Note: See TracBrowser for help on using the repository browser.