Whamcloud - gitweb
LU-17423 ldiskfs: pass NULL to ext4_dir_rec_len for dot and dotdot
[fs/lustre-release.git] / lustre-dkms_post-build.sh
1 #!/bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3
4 #
5 # This file is part of Lustre, http://www.lustre.org/
6 #
7 # lustre-dkms_post-build.sh
8 #
9 # Script run after dkms build
10 #
11
12 #
13 # $1 : $module
14 # $2 : $module_version
15 # $3 : $kernelver
16 # $4 : $kernel_source_dir
17 # $5 : $arch
18 # $6 : $source_tree
19 # $7 : $dkms_tree
20 # $8 : $kmoddir
21 #
22 # This script ensure that ALL Lustre kernel modules that have been built
23 # during DKMS build step of lustre[-client]-dkms module will be moved in
24 # DKMS vault/repository, and this before the build directory content will be
25 # trashed.
26 # This is required because dkms.conf file is only sourced at the very
27 # beginning of the DKMS build step when its content has to be on-target
28 # customized during pre_build script. This can lead to incomplete list
29 # of built Lustre kernel modules then to be saved for next DKMS install step.
30 #
31
32 #
33 # Use this place to also save config.log that has been generated during
34 # pre_build.
35 # $7/$1/$2/$3/$5/log repository should have already been created to save
36 # make.log and $kernel_config
37 #
38
39 mkdir -p "$7/$1/$2/$3/$5/log"
40 cp -f "$7/$1/$2/build/config.log" "$7/$1/$2/$3/$5/log/config.log" 2>/dev/null
41 cp -f "$7/$1/$2/build/config.h" \
42     "$7/$1/$2/build/Module.symvers" \
43     "$7/$1/$2/$3/$5/" 2> /dev/null
44
45 case $1 in
46     lustre-zfs|lustre-all)
47         # To satisfy the content of lustre-osd-zfs-mount install these scripts:
48         for script in statechange-lustre.sh \
49                       vdev_attach-lustre.sh \
50                       vdev_clear-lustre.sh \
51                       vdev_remove-lustre.sh
52         do
53                 install -D -m 0755 lustre/scripts/${script} /etc/zfs/zed.d/${script}
54         done
55         ;;
56 esac