定义在scripts/functions中。
# Don‘t do log messages here to avoid confusing graphical boots
run_scripts /scripts/init-top
在init脚本中被调用:
maybe_break modules
[ "$quiet" != "y" ] && log_begin_msg "Loading essential drivers"
load_modules
[ "$quiet" != "y" ] && log_end_msg
# Load custom modules first
load_modules()
{
if [ -e /conf/modules ]; then
cat /conf/modules | while read m; do
# Skip empty lines
if [ -z "$m" ]; then
continue
fi
# Skip comments - d?ash removes whitespace prefix
com=$(printf "%.1s" "${m}")
if [ "$com" = "#" ]; then
continue
fi
modprobe $m
done
fi
}
时间: 2024-10-21 21:14:53