summaryrefslogblamecommitdiffstats
path: root/builder/dnbd3-rootfs/hooks/load-custom-kernel-modules.sh
blob: 653dc9a726a084779c5acf47d17b55d2c3f54fff (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
                                 

                                                        
                                     

                                                       
          



                                           

                                                
          
  
            
( # subshell for variable scoping
DNBD3_MOD_PATH="/usr/lib/modules/current/extra/dnbd3.ko"

if [ ! -e "${DNBD3_MOD_PATH}" ]; then
    warn "No such file of directory: ${DNBD3_MOD_PATH}"
    emergency_shell -n "Error in $0"
    exit 1
fi

# load the kernel modules for dnbd3 and nbd
if ! insmod "${DNBD3_MOD_PATH}"; then
    warn "Failed to load DNBD3 kernel module..."
    emergency_shell -n "Error in $0"
    exit 1
fi
) || exit $?