Guest User

Untitled

a guest
Oct 21st, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. --- install.orig 2017-10-20 19:18:57.240322615 +0000
  2. +++ install 2017-10-20 19:37:55.853078427 +0000
  3. @@ -86,7 +86,7 @@
  4. end
  5.  
  6. def supported_ruby_versions
  7. - ['2.3', '2.2', '2.1', '2.0']
  8. + ['2.4', '2.3', '2.2', '2.1', '2.0']
  9. end
  10.  
  11. # check ruby version, only version 2.x works
  12. @@ -311,6 +311,7 @@
  13. @log.info('Attempting to automatically detect supported package manager type for system...')
  14.  
  15. has_yum = run_command('which yum >/dev/null 2>/dev/null')
  16. + has_dnf = run_command('which dnf >/dev/null 2>/dev/null')
  17. has_apt_get = run_command('which apt-get >/dev/null 2>/dev/null')
  18. has_gdebi = run_command('which gdebi >/dev/null 2>/dev/null')
  19. has_zypper = run_command('which zypper >/dev/null 2>/dev/null')
  20. @@ -320,7 +321,7 @@
  21. exit(1)
  22. end
  23.  
  24. - if(has_yum)
  25. + if(has_yum || has_dnf)
  26. @type = 'rpm'
  27. elsif(has_zypper)
  28. @type = 'zypper'
  29. @@ -356,7 +357,7 @@
  30. @log.info('Running version matches target version, skipping install')
  31. else
  32. #use -y to answer yes to confirmation prompts
  33. - install_cmd = ['/usr/bin/yum', '-y', 'localinstall']
  34. + install_cmd = [has_dnf ? '/usr/bin/dnf' : '/usr/bin/yum', '-y', 'localinstall']
  35. install_from_s3(region, bucket, version_file_key, @type, install_cmd)
  36. do_sanity_check('/sbin/service')
  37. end
Add Comment
Please, Sign In to add comment