ws: Handle the case where hostnamed is not active or available
ws: Handle the case where hostnamed is not active or available

This is code path should be resilient to the hostnamed service
not running. In addition, allows us to test in places where
no systemd is running.

Reviewed-by: Marius Vollmer <bb11c6e942c5cc765df5f04da146b3198127a7a3@redhat.com>

cockpituous/cockpit,vanloswang/cockpit,matobet/cockpit,matobet/cockpit,kkaempf/cockpit,SotolitoLabs/cockpit,jscotka/cockpit,zigitax/cockpit,sgallagher/cockpit,maxamillion/cockpit,harishanand95/cockpit,mareklibra/cockpit,Armstrong1992/cockpit,garrett/cockpit,dperpeet/cockpit,mvollmer/cockpit,dperpeet/cockpit,mvollmer/cockpit,moolitayer/cockpit,petervo/cockpit,cockpituous/cockpit,michalskrivanek/cockpit,FireDrunk/cockpit,haiyangd/cockpit_view,sub-mod/cockpit,maxamillion/cockpit,petervo/cockpit,cockpit-project/cockpit,michalskrivanek/cockpit,denysvitali/cockpit,andreasn/cockpit,darioajr/cockpit,garrett/cockpit,kkaempf/cockpit,maxamillion/cockpit,denysvitali/cockpit,arilivigni/cockpit,evol262/cockpit,mareklibra/cockpit,sgallagher/cockpit,Armstrong1992/cockpit,maxamillion/cockpit,sgallagher/cockpit,kkaempf/cockpit,martinpitt/cockpit,mareklibra/cockpit,firebitsbr/cockpit,sub-mod/cockpit,stefwalter/cockpit,fridex/cockpit,matobet/cockpit,Armstrong1992/cockpit,nmav/cockpit,mareklibra/cockpit,arilivigni/cockpit,fridex/cockpit,larsu/cockpit,arilivigni/cockpit,martinpitt/cockpit,moraleslazaro/cockpit,cockpituous/cockpit,andreasn/cockpit,vanloswang/cockpit,nmav/cockpit,moolitayer/cockpit,Thermionix/cockpit,netzvieh/cockpit,zigitax/cockpit,firebitsbr/cockpit,sgallagher/cockpit,Thermionix/cockpit,larsu/cockpit,SotolitoLabs/cockpit,harishanand95/cockpit,vanloswang/cockpit,haiyangd/cockpit_view,firebitsbr/cockpit,deryni/cockpit,Scribery/cockpit,andreasn/cockpit,vbatts/cockpit,evol262/cockpit,petervo/cockpit,arilivigni/cockpit,firebitsbr/cockpit,dperpeet/cockpit,sub-mod/cockpit,sgallagher/cockpit,SotolitoLabs/cockpit,SotolitoLabs/cockpit,cockpit-project/cockpit,matobet/cockpit,xhad/cockpit,harishanand95/cockpit,moraleslazaro/cockpit,nmav/cockpit,FireDrunk/cockpit,vbatts/cockpit,mvollmer/cockpit,xhad/cockpit,moolitayer/cockpit,haiyangd/cockpit_view,deryni/cockpit,sgallagher/cockpit,martinpitt/cockpit,stefwalter/cockpit,martinpitt/cockpit,netzvieh/cockpit,andreasn/cockpit,michalskrivanek/cockpit,michalskrivanek/cockpit,cockpituous/cockpit,Scribery/cockpit,SotolitoLabs/cockpit,Thermionix/cockpit,fridex/cockpit,moraleslazaro/cockpit,nmav/cockpit,arilivigni/cockpit,evol262/cockpit,larsu/cockpit,fridex/cockpit,matobet/cockpit,xhad/cockpit,dperpeet/cockpit,larsu/cockpit,netzvieh/cockpit,haiyangd/cockpit_view,vanloswang/cockpit,cockpit-project/cockpit,stefwalter/cockpit,larskarlitski/cockpit,Scribery/cockpit,petervo/cockpit,dperpeet/cockpit,dperpeet/cockpit,harishanand95/cockpit,zigitax/cockpit,deryni/cockpit,moraleslazaro/cockpit,harishanand95/cockpit,andreasn/cockpit,cockpituous/cockpit,SotolitoLabs/cockpit,sgallagher/cockpit,jscotka/cockpit,nmav/cockpit,xhad/cockpit,netzvieh/cockpit,dperpeet/cockpit,darioajr/cockpit,arilivigni/cockpit,jscotka/cockpit,larskarlitski/cockpit,fridex/cockpit,andreasn/cockpit,Armstrong1992/cockpit,vbatts/cockpit,sub-mod/cockpit,mareklibra/cockpit,stefwalter/cockpit,xhad/cockpit,netzvieh/cockpit,stefwalter/cockpit,garrett/cockpit,denysvitali/cockpit,Scribery/cockpit,denysvitali/cockpit,vanloswang/cockpit,matobet/cockpit,jscotka/cockpit,michalskrivanek/cockpit,jscotka/cockpit,petervo/cockpit,larsu/cockpit,michalskrivanek/cockpit,haiyangd/cockpit_view,garrett/cockpit,cockpit-project/cockpit,arilivigni/cockpit,xhad/cockpit,harishanand95/cockpit,deryni/cockpit,vanloswang/cockpit,moraleslazaro/cockpit,larskarlitski/cockpit,petervo/cockpit,Armstrong1992/cockpit,Scribery/cockpit,netzvieh/cockpit,moraleslazaro/cockpit,denysvitali/cockpit,harishanand95/cockpit,stefwalter/cockpit,larskarlitski/cockpit,FireDrunk/cockpit,darioajr/cockpit,zigitax/cockpit,larskarlitski/cockpit,maxamillion/cockpit,sub-mod/cockpit,jscotka/cockpit,garrett/cockpit,moolitayer/cockpit,stefwalter/cockpit,cockpituous/cockpit,evol262/cockpit,vanloswang/cockpit,vbatts/cockpit,deryni/cockpit,larskarlitski/cockpit,andreasn/cockpit,deryni/cockpit,darioajr/cockpit,kkaempf/cockpit,martinpitt/cockpit,michalskrivanek/cockpit,larskarlitski/cockpit,FireDrunk/cockpit,petervo/cockpit,firebitsbr/cockpit,darioajr/cockpit,evol262/cockpit,Thermionix/cockpit,mvollmer/cockpit,mareklibra/cockpit,zigitax/cockpit,larsu/cockpit,Scribery/cockpit,Thermionix/cockpit,evol262/cockpit,mareklibra/cockpit,FireDrunk/cockpit,SotolitoLabs/cockpit,xhad/cockpit,vbatts/cockpit,mvollmer/cockpit,Thermionix/cockpit,Scribery/cockpit,vbatts/cockpit,kkaempf/cockpit,fridex/cockpit,deryni/cockpit,moolitayer/cockpit,cockpit-project/cockpit,moraleslazaro/cockpit