diff options
-rwxr-xr-x | kvmx | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -318,12 +318,12 @@ function kvmx_up { #sleep 5 #echo "" + kvmx_hostname + # Somehow it is starting before DBUS and then crashing, so we try to start again echo "Ensure spice-vdagent is running..." echo "sudo /usr/sbin/service spice-vdagent start" | kvmx_ssh - kvmx_hostname - if [ ! -z "$shared_folder" ] && [ ! -z "$shared_folder_mountpoint" ]; then echo "Mounting $shared_folder on $shared_folder_mountpoint on guest..." echo "sudo mkdir -p $shared_folder_mountpoint" | kvmx_ssh @@ -349,16 +349,16 @@ function kvmx_hostname { # Set hosts entry if ! grep -q "^127.0.0.1 $hostname.$domain $hostname$" /etc/hosts; then - echo "127.0.0.1 $hostname.$domain $hostname" | sudo tee -a /etc/hosts > /dev/null + echo "127.0.0.1 $hostname.$domain $hostname" | sudo tee -a /etc/hosts &> /dev/null fi - echo "$hostname.$domain" | sudo tee /etc/hostname > /dev/null - sudo hostname $hostname.$domain + echo "$hostname.$domain" | sudo tee /etc/hostname &> /dev/null + sudo hostname $hostname.$domain 2> /dev/null # Remove old hostname from hosts file if [ "\$OLD_HOST" != "$hostname.$domain" ]; then if grep -q \$OLD_HOST /etc/hosts; then - sudo sed -i -e "/\$OLD_HOST/d" /etc/hosts + sudo sed -i -e "/\$OLD_HOST/d" /etc/hosts 2> /dev/null fi fi ##### END REMOTE SCRIPT ####### |