config/dracut/90zfs: handle cases where hostid(1) returns all zeros
[zfs.git] / scripts / dkms.postbuild
blob81de475877dddd3ff1e5db48886168af0b8761f4
1 #!/bin/sh
3 PROG=$0
5 while getopts "a:k:n:t:v:" opt; do
6 case $opt in
7 a) arch=$OPTARG ;;
8 k) kver=$OPTARG ;;
9 n) pkgname=$OPTARG ;;
10 t) tree=$OPTARG ;;
11 v) pkgver=$OPTARG ;;
12 esac
13 done
15 if [ -z "${arch}" ] || [ -z "${kver}" ] || [ -z "${pkgname}" ] || \
16 [ -z "${tree}" ] || [ -z "${pkgver}" ]; then
17 echo "Usage: $PROG -a <arch> -k <kver> -n <pkgname>" \
18 "-t <tree> -v <pkgver>"
19 exit 1
22 cp "${tree}/${pkgname}/${pkgver}/build/zfs_config.h" \
23 "${tree}/${pkgname}/${pkgver}/build/module/Module.symvers" \
24 "${tree}/${pkgname}/${pkgver}/${kver}/${arch}/"