SILENT KILLERPanel

Current Path: > > lib > dracut > modules.d > 95nbd


Operation   : Linux premium88.web-hosting.com 4.18.0-553.54.1.lve.el8.x86_64 #1 SMP Wed Jun 4 13:01:13 UTC 2025 x86_64
Software     : Apache
Server IP    : 185.61.154.216 | Your IP: 216.73.216.44
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: //lib/dracut/modules.d/95nbd

NameTypeSizeLast ModifiedActions
module-setup.sh File 1024 bytes October 08 2018 13:38:33.
nbd-generator.sh File 1152 bytes October 08 2018 13:38:33.
nbdroot.sh File 3764 bytes October 08 2018 13:38:33.
parse-nbdroot.sh File 1756 bytes October 08 2018 13:38:33.

Reading File: //lib/dracut/modules.d/95nbd/module-setup.sh

#!/bin/bash

# called by dracut
check() {
    local _rootdev

    # if an nbd device is not somewhere in the chain of devices root is
    # mounted on, fail the hostonly check.
    [[ $hostonly ]] || [[ $mount_needs ]] && {
        is_nbd() { [[ -b /dev/block/$1 && $1 == 43:* ]] ;}

        _rootdev=$(find_root_block_device)
        [[ -b /dev/block/$_rootdev ]] || return 1
        check_block_and_slaves is_nbd "$_rootdev" || return 255
    }
    require_binaries nbd-client || return 1

    return 0
}

# called by dracut
depends() {
    # We depend on network modules being loaded
    echo network rootfs-block
}

# called by dracut
installkernel() {
    instmods nbd
}

# called by dracut
install() {
    inst nbd-client
    inst_hook cmdline 90 "$moddir/parse-nbdroot.sh"
    inst_script "$moddir/nbdroot.sh" "/sbin/nbdroot"
    if dracut_module_included "systemd-initrd"; then
        inst_script "$moddir/nbd-generator.sh" $systemdutildir/system-generators/dracut-nbd-generator
    fi
    dracut_need_initqueue
}


SILENT KILLER Tool