         ctx.execute
           cmd: """
           code=3
+          # !IMPORTANT!
+          # we are currently retrieving the current version and not the latest one
+          # solution would be to either get the version from configuration or
+          # always use the latest version (as inside the next condition).
           version=`hdp-select status #{options.version_name} | sed 's/.* \\(\\d*\\)/\\1/'`
           if [ ! -d "/usr/hdp/$version" ]; then
             version=`yum repolist | egrep HDP-[0-9] | sed 's/^HDP-\\([0-9\\.]*\\).*$/\\1/'`

            fi
          fi
          echo $version
          source="/etc/init.d/#{options.name}"
          target="/usr/hdp/$version/etc/rc.d/init.d/#{options.name}"
          create=1

            ln -sf $target $source
            code=0
          fi
          # Deal with "/etc/default" environment scripts
          for filename in #{Object.keys(options.etc_default).join(' ')}; do
            source="/etc/default/$filename"
            target="/usr/hdp/$version/etc/default/$filename"
