#!/bin/bash # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- # ex: ts=8 sw=4 sts=4 et filetype=sh # We depend on network modules being loaded [ "$1" = "-d" ] && echo network # If our prerequisites are not met, fail. type -P nbd-client >/dev/null || exit 1 # if an nbd device is not somewhere in the chain of devices root is mounted on, # fail the hostonly check. [ "$1" = "-h" ] && { is_nbd() { [[ -b /dev/block/$1 && $1 == 43:* ]] ;} . $dracutfunctions rootdev=$(find_root_block_device) [[ -b /dev/block/$rootdev ]] || exit 1 check_block_and_slaves is_nbd "$rootdev" || exit 1 } exit 0