403Webshell
Server IP : 80.241.246.6  /  Your IP : 216.73.216.188
Web Server : Apache/2.4.25 (Debian)
System : Linux kharagauli 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
User : www-data ( 33)
PHP Version : 7.0.33-0+deb9u12
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,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,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/initramfs-tools/hooks/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/initramfs-tools/hooks/resume
#!/bin/sh

PREREQ=""

prereqs()
{
	echo "$PREREQ"
}

case $1 in
# get pre-requisites
prereqs)
	prereqs
	exit 0
	;;
esac

. /usr/share/initramfs-tools/scripts/functions

# First check if a location is set and is a valid swap partition.
# If so, the config file will be copied in and there is nothing to do.
if [ -n "$RESUME" ] && [ "$RESUME" != auto ]; then
	if [ "$RESUME" = none ]; then
		exit 0
	fi
	if resume_dev_node="$(resolve_device "$RESUME")" && \
	   blkid -p -n swap "$resume_dev_node" >/dev/null 2>&1; then
		exit 0
	fi

	echo >&2 "W: initramfs-tools configuration sets RESUME=$RESUME"
	echo >&2 "W: but no matching swap device is available."
fi

# If we were not explicitly requested to select a device, report that we
# are doing so
report_auto()
{
	test "$RESUME" = auto || echo >&2 "I: $*"
}

# We need to be able to read the listed swap partitions
if ischroot || [ ! -r /proc/swaps ]; then
	resume_auto=
else
	# Try to autodetect the RESUME partition, using biggest swap?
	resume_auto=$(grep ^/dev/ /proc/swaps | sort -rnk3 | head -n 1 | cut -d " " -f 1)
	if [ -n "$resume_auto" ]; then
		UUID=$(blkid -s UUID -o value "$resume_auto" || true)
		report_auto "The initramfs will attempt to resume from $resume_auto"
		if [ -n "$UUID" ]; then
			report_auto "(UUID=$UUID)"
			resume_auto="UUID=$UUID"
		fi
		report_auto "Set the RESUME variable to override this."
	fi
fi

# Write selected resume device to intramfs conf.d
if [ "$RESUME" = auto ] || [ -n "$resume_auto" ]; then
	# If we were explicitly requested to select a device, and we failed,
	# report that
	if [ -z "$resume_auto" ]; then
		echo >&2 "W: initramfs-tools failed to select a resume device"
	fi
	echo "RESUME=${resume_auto}" > ${DESTDIR}/conf/conf.d/zz-resume-auto
fi

Youez - 2016 - github.com/yon3zu
LinuXploit