From 88f10ad40950d3134de0301cd226d768d765fd00 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 11 Oct 2016 11:40:48 +0200 Subject: [PATCH] aggregateModules: Preserve kernel's modules.{builtin,order} Fixes #19426. --- pkgs/os-specific/linux/kmod/aggregator.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/linux/kmod/aggregator.nix b/pkgs/os-specific/linux/kmod/aggregator.nix index 88069ba4bf13..9bd7c8480c1c 100644 --- a/pkgs/os-specific/linux/kmod/aggregator.nix +++ b/pkgs/os-specific/linux/kmod/aggregator.nix @@ -17,10 +17,12 @@ buildEnv { echo "kernel version is $kernelVersion" + shopt -s extglob + # Regenerate the depmod map files. Be sure to pass an explicit # kernel version number, otherwise depmod will use `uname -r'. if test -w $out/lib/modules/$kernelVersion; then - rm -f $out/lib/modules/$kernelVersion/modules.* + rm -f $out/lib/modules/$kernelVersion/modules.!(builtin*|order*) ${kmod}/bin/depmod -b $out -a $kernelVersion fi '';