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


                       
                                
                      
                   
                                                                 
           

              






                                                          

      
 


                
                                              

                                                



                                                     
#!/usr/bin/env bash
# -*- coding: utf-8 -*-
# region imports
source '/usr/lib/rebash/core.sh'
core.import exceptions
core.import logging
type emergency_shell >/dev/null 2>&1 || source /lib/dracut-lib.sh
# endregion
exceptions.try
{
for kmod in dnbd3 \
            loop  \
            loop_file_fmt_qcow \
            loop_file_fmt_raw; do
    if ! modprobe "${kmod}"; then
        logging.warn "Failed to load kernel module: $kmod"
        ! :
    fi
done

}
exceptions.catch
{
    logging.error "$exceptions_last_traceback"
    emergency_shell "error in ${BASH_SOURCE[0]}"
}
# region vim modline
# vim: set tabstop=4 shiftwidth=4 expandtab:
# vim: foldmethod=marker foldmarker=region,endregion:
# endregion