1eff4a436e
Flavour is overloaded in openstack due to it being used by nova. Element seems to have the same feeling of combinability without using a term already in active use in the openstack community. Change-Id: Ia4c028d4062a8f69c66665821c94dd4bcdf06031
27 lines
608 B
Bash
Executable file
27 lines
608 B
Bash
Executable file
#!/bin/sh
|
|
|
|
# Build iscsi modules with installed kernel
|
|
|
|
set -e
|
|
set -o xtrace
|
|
|
|
package=iscsitarget-dkms
|
|
name=iscsitarget
|
|
|
|
kernel_version=`ls /boot/vmlinuz-* -r -1| head -n1 | xargs basename |sed 's/vmlinuz-//'`
|
|
|
|
version=`dpkg-query -W -f='${Version}' "$package" \
|
|
|rev|cut -d- -f2-|rev|cut -d':' -f2|tr -d "\n"`
|
|
|
|
isadded=`dkms status -m "$cd name" -v "$version"`
|
|
|
|
|
|
|
|
if [ "x${isadded}" = "x" ] ; then
|
|
dkms add -m "$name" -v "$version" -k "$kernel_version" || true
|
|
fi
|
|
|
|
dkms build -m "$name" -v "$version" -k "$kernel_version" && dkms install -m "$name" -v "$version" -k "$kernel_version" || true
|
|
|
|
|
|
|