Skip to content

Commit

Permalink
add -M option for dumping autodetected modules
Browse files Browse the repository at this point in the history
  • Loading branch information
falconindy committed Apr 29, 2011
1 parent b1309fc commit a7370a0
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion geninit
Original file line number Diff line number Diff line change
Expand Up @@ -309,13 +309,14 @@ trap 'cleanup 143' SIGTERM
## option parsing ##
# ------------------ #

while getopts ':b:c:g:hk:p:S:z:' flag; do
while getopts ':b:c:g:hk:Mp:S:z:' flag; do
case $flag in
b) basedir=$OPTARG ;;
c) config=$OPTARG ;;
g) imagename=$OPTARG ;;
h) usage ;;
k) kernver=$OPTARG ;;
M) automods=1 ;;
p) preset=$OPTARG ;;
S) skipbuilders=(${OPTARG//,/ }) ;;
z) ocompress=$OPTARG ;; # named differently to allow overriding
Expand Down Expand Up @@ -375,6 +376,14 @@ cpio_filelist=$tmpdir/cpiofilelist.$$
autodetect_cache=$tmpdir/autodetect.cache
moduledir=/lib/modules/$kernver

if (( automods )); then
. "$_sharedir/builders/autodetect" || die "unable to source autodetect builder"
build
info "Autodetected modules"
[[ -s $autodetect_cache ]] && cat "$autodetect_cache"
cleanup 0
fi

if [[ $preset ]]; then
__build_preset "$preset"
else
Expand Down

0 comments on commit a7370a0

Please sign in to comment.