403Webshell
Server IP : 88.99.149.37  /  Your IP : 216.73.216.141
Web Server : nginx/1.31.2
System : Linux server-88-99-149-37 6.12.0-124.56.5.el10_1.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 15 06:12:08 EDT 2026 x86_64
User : muralimurth ( 1015)
PHP Version : 8.4.23
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/dracut/modules.d/90dm/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/dracut/modules.d/90dm/dm-shutdown.sh
#!/usr/bin/sh

_remove_dm() {
    local dev="$1"
    local final="$2"
    local s
    local devname

    for s in /sys/block/"${dev}"/holders/dm-*; do
        [ -e "${s}" ] || continue
        _remove_dm "${s##*/}" "$final" || return $?
    done

    read -r devname < /sys/block/"${dev}"/dm/name
    case $(cat /sys/block/"${dev}"/dm/uuid) in
        mpath-*)
            # multipath devices might have MD devices on top,
            # which are removed after this script. So do not
            # remove those to avoid spurious errors
            return 0
            ;;
        CRYPT-*)
            if command -v systemd-cryptsetup > /dev/null; then
                DM_DISABLE_UDEV=true SYSTEMD_LOG_LEVEL=debug systemd-cryptsetup detach "$devname" && return 0
            elif command -v cryptsetup > /dev/null; then
                DM_DISABLE_UDEV=true cryptsetup close --debug "$devname" && return 0
            else
                dmsetup -v --noudevsync remove "$devname"
                return $?
            fi

            # try using plain dmsetup if we're on the final attempt.
            [ -z "$final" ] && return 1
            ;;
    esac

    dmsetup -v --noudevsync remove "$devname"
    return $?
}

_do_dm_shutdown() {
    local ret=0
    local final="$1"
    local dev

    info "Disassembling device-mapper devices"
    for dev in /sys/block/dm-*; do
        [ -e "${dev}" ] || continue
        if [ "x$final" != "x" ]; then
            _remove_dm "${dev##*/}" "$final" || ret=$?
        else
            _remove_dm "${dev##*/}" "$final" > /dev/null 2>&1 || ret=$?
        fi
    done
    if [ "x$final" != "x" ]; then
        info "dmsetup ls --tree"
        dmsetup ls --tree 2>&1 | vinfo
    fi
    return $ret
}

if command -v dmsetup > /dev/null \
    && [ "x$(dmsetup status)" != "xNo devices found" ]; then
    _do_dm_shutdown "$1"
else
    :
fi

Youez - 2016 - github.com/yon3zu
LinuXploit