0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 18.225.56.181


Current Path : /proc/self/root/usr/lib/os-probes/mounted/
Upload File :
Current File : //proc/self/root/usr/lib/os-probes/mounted/40lsb

#!/bin/sh
# Test for LSB systems.
set -e

. /usr/share/os-prober/common.sh

partition="$1"
dir="$2"
type="$3"

lsb_field () {
	file="$1"
	field="$2"
	grep ^"$field" "$file" | cut -d = -f 2 | sed 's/^"//' | sed 's/"$//' | sed 's/:/ /g'
}

file="$dir/etc/lsb-release"
if [ ! -e "$file" ]; then
	exit 1
fi

release=$(lsb_field "$file" DISTRIB_RELEASE)
if [ -z "$release" ]; then
	release=$(lsb_field "$file" DISTRIB_CODENAME)
fi
description=$(lsb_field "$file" DISTRIB_DESCRIPTION)
if [ -z "$description" ]; then
	description=$(lsb_field "$file" DISTRIB_CODENAME)
fi

if [ -n "$description" ]; then
	if [ -n "$release" ]; then
		long="$description ($release)"
	else
		long="$description"
	fi
else
	exit 1
fi

short=$(lsb_field "$file" DISTRIB_ID | sed 's/ //g')
if [ -z "$short" ]; then
	short="UnknownLSB"
fi

label="$(count_next_label "$short")"
result "$partition:$long:$label:linux"
exit 0