diff options
Diffstat (limited to 'share/hydractl/dist-upgrade')
-rwxr-xr-x | share/hydractl/dist-upgrade | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/share/hydractl/dist-upgrade b/share/hydractl/dist-upgrade index 82de2e9..965ab31 100755 --- a/share/hydractl/dist-upgrade +++ b/share/hydractl/dist-upgrade @@ -38,11 +38,27 @@ function hydra_system_upgrade_stage { # Set and check upgrade environment function hydra_system_upgrade_env { + # Check for requirements + for req in facter; do + hydra_install_package $req + done + # Available releases #release="`facter lsbdistcodename`" # this doesn't work on squeeze release="`facter 2> /dev/null | grep lsbdistcodename | sed -e 's/lsbdistcodename => //'`" + + # Since buster + if [ -z "$release" ]; then + release="`facter 2> /dev/null | grep codename | sed -e 's/codename => //' | cut -d '"' -f 2`" + fi + nextrelease="`hydra_next_debian_release $release`" + if [ "$nextrelease" == "Unsupported release" ]; then + echo "$nextrelease after $release" + exit 1 + fi + # Is a virtual machine? virtual="`facter 2> /dev/null | grep virtual | grep -v '^is_virtual' | sed -e 's/virtual => //'`" |