Open alonsocamaro opened 8 years ago
A fix is the following:
root@node-1:~/onboarding/os-functions# diff -u10 os-license.sh*
--- os-license.sh 2016-08-04 17:56:46.909058172 +0000
+++ os-license.sh.orig 2016-08-04 17:57:07.544995194 +0000
@@ -120,21 +120,20 @@
provisionable_modules=$(get_supported_modules)
enabled_modules=$(awk '/^mod.*enabled/ { print $1 }' /config/bigip.license |
sed 's/mod_//' | tr '\n' ' ')
for module in $enabled_modules; do
case $module in
wo@(c|m)) module="wom" ;;
wa?(m)) module="wam" ;;
af@(m|w)) module="afm" ;;
am) module="apm" ;;
- dnsgtm) module="gtm" ;;
esac
if [[ "$provisionable_modules" == *"$module"* ]]; then
licensed_modules="$licensed_modules $module"
log "Found license for $(upcase $module) module..."
fi
done
echo "$licensed_modules"
else
Test:
With old function:
[root@bigip1:Active:Standalone] os-functions # get_licensed_modules
ltm ilx asm apm apm afm afm ltm ilx gtm asm apm apm afm afm ltm ilx asm apm apm afm afm
With new function:
[root@bigip1:Active:Standalone] os-functions # get_licensed_modules
ltm ilx asm apm apm afm afm ltm ilx gtm asm apm apm afm afm
In the os-license.sh:get_licensed_modules function
enabled_modules variable returns the GTM/DNS license as "dnsgtm"
and provisionable_modules / get_supported_modules funtion returns the following tokens
which makes the following comparison to do not work
if [[ "$provisionable_modules" == *"$module"* ]]; then