__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
#!/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
resume_dev_node=$(resolve_device "$RESUME") || true
resume_dev_type=$(blkid -p -s TYPE -o value "$resume_dev_node") || true
if [ "$resume_dev_type" = swap ]; 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, or the -v
# option is used, report that we are doing so
report_auto()
{
test "${verbose?}" != y && test "$RESUME" = auto || echo "I: $*"
}
# Report in excruciating detail if the -v option is used
report_verbose()
{
test "${verbose?}" != y || echo "I: $*"
}
report_verbose "Configuration sets RESUME=$RESUME"
# Try to autodetect the RESUME partition, using biggest swap device that
# is not ephemeral. We need to be able to read the listed swap partitions.
resume_auto=
if ! ischroot && [ -r /proc/swaps ]; then
# shellcheck disable=SC2013
for resume_auto in $(grep ^/dev/ /proc/swaps | sort -rnk3 | cut -d " " -f 1); do
report_verbose "Checking swap device $resume_auto"
ephemeral=false
dm_name="$(dmsetup info -c --noheadings -o name "$resume_auto" 2>/dev/null)"
# dm-crypt is ephemeral if the key file is /dev/urandom
if [ -n "$dm_name" ] && [ -e /etc/crypttab ]; then
report_verbose "$resume_auto has device-mapper name $dm_name; checking crypttab"
# shellcheck disable=SC2034
while read -r cryptdev srcdev keyfile junk; do
report_verbose "Found cryptdev=$cryptdev keyfile=$keyfile"
if [ "$cryptdev" = "$dm_name" ] && [ "$keyfile" = /dev/urandom ]; then
report_verbose "Rejecting $resume_auto since it has no permanent key"
ephemeral=true
fi
done < /etc/crypttab
fi
# zram is ephemeral
case "$resume_auto" in
/dev/zram*)
report_verbose "Rejecting $resume_auto since it is zram"
ephemeral=true
;;
/dev/zd[0-9]*)
report_verbose "Rejecting $resume_auto since it is zvol"
ephemeral=true
;;
esac
$ephemeral || break
done
if $ephemeral; then
resume_auto=
fi
if [ -n "$resume_auto" ]; then
if [ -n "$dm_name" ]; then
resume_auto_canon="/dev/mapper/$dm_name"
elif UUID=$(blkid -s UUID -o value "$resume_auto"); then
resume_auto_canon="UUID=$UUID"
else
resume_auto_canon=
fi
report_auto "The initramfs will attempt to resume from $resume_auto"
if [ -n "$resume_auto_canon" ]; then
report_auto "($resume_auto_canon)"
resume_auto="$resume_auto_canon"
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
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| amd64_microcode | File | 3.77 KB | 0755 |
|
| bcache | File | 543 B | 0755 |
|
| btrfs | File | 701 B | 0755 |
|
| cloud-initramfs-dyn-netconf | File | 118 B | 0755 |
|
| console_setup | File | 3.07 KB | 0755 |
|
| copymods | File | 280 B | 0755 |
|
| cryptgnupg | File | 958 B | 0755 |
|
| cryptgnupg-sc | File | 2.4 KB | 0755 |
|
| cryptkeyctl | File | 457 B | 0755 |
|
| cryptopensc | File | 1.48 KB | 0755 |
|
| cryptpassdev | File | 888 B | 0755 |
|
| cryptroot | File | 15.63 KB | 0755 |
|
| cryptroot-unlock | File | 1010 B | 0755 |
|
| dhcpcd | File | 1.3 KB | 0755 |
|
| dmsetup | File | 506 B | 0755 |
|
| fixrtc | File | 436 B | 0755 |
|
| framebuffer | File | 386 B | 0755 |
|
| fsck | File | 2.06 KB | 0755 |
|
| fuse | File | 231 B | 0755 |
|
| intel_microcode | File | 4.73 KB | 0755 |
|
| iscsi | File | 672 B | 0755 |
|
| kbd | File | 301 B | 0755 |
|
| klibc-utils | File | 694 B | 0755 |
|
| kmod | File | 468 B | 0755 |
|
| lvm2 | File | 661 B | 0755 |
|
| mdadm | File | 3.14 KB | 0755 |
|
| ntfs_3g | File | 304 B | 0755 |
|
| overlayroot | File | 688 B | 0755 |
|
| plymouth | File | 6.04 KB | 0755 |
|
| resume | File | 3.19 KB | 0755 |
|
| sg3-utils | File | 485 B | 0755 |
|
| thermal | File | 1.14 KB | 0755 |
|
| thin-provisioning-tools | File | 331 B | 0755 |
|
| udev | File | 2.59 KB | 0755 |
|
| xfs | File | 850 B | 0755 |
|
| zz-busybox-initramfs | File | 2.18 KB | 0755 |
|