From 3a5a62121aca04b13d5148f3f8c5a3f9d6f27e17 Mon Sep 17 00:00:00 2001 From: gau1991 Date: Tue, 2 Sep 2014 20:14:32 +0530 Subject: [PATCH] Fixed Debian hostname issue --- bin/install | 7 ++++++- src/lib/ee_lib_check_fqdn.sh | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/bin/install b/bin/install index 6335936e..8bdb4d7a 100644 --- a/bin/install +++ b/bin/install @@ -42,6 +42,7 @@ readonly EE_LOG_DIR=/var/log/easyengine readonly EE_INSTALL_LOG=/var/log/easyengine/install.log readonly EE_ERROR_LOG=/var/log/easyengine/error.log readonly EE_LINUX_DISTRO=$(lsb_release -i |awk '{print $3}') +readonly EE_DEBIAN_VERSION=$(lsb_release -sc) # Checking linux distro if [ "$EE_LINUX_DISTRO" != "Ubuntu" ] && [ "$EE_LINUX_DISTRO" != "Debian" ]; then @@ -88,7 +89,11 @@ function ee_lib_check_fqdn() *.*) if [ "$EE_FQDN" != "" ];then echo $EE_FQDN > /etc/hostname - service hostname restart &>> $EE_INSTALL_LOG + if [ "$EE_DEBIAN_VERSION" == "squeeze" ];then + /etc/init.d/hostname.sh start &>> $EE_COMMAND_LOG + else + service hostname restart &>> $EE_COMMAND_LOG + fi hostname -f &>> $EE_INSTALL_LOG fi ;; diff --git a/src/lib/ee_lib_check_fqdn.sh b/src/lib/ee_lib_check_fqdn.sh index 4432031f..1f8648a0 100644 --- a/src/lib/ee_lib_check_fqdn.sh +++ b/src/lib/ee_lib_check_fqdn.sh @@ -6,7 +6,11 @@ function ee_lib_check_fqdn() *.*) if [ "$EE_FQDN" != "" ];then echo $EE_FQDN > /etc/hostname - service hostname restart &>> $EE_COMMAND_LOG + if [ "$EE_DEBIAN_VERSION" == "squeeze" ];then + /etc/init.d/hostname.sh start &>> $EE_COMMAND_LOG + else + service hostname restart &>> $EE_COMMAND_LOG + fi hostname -f &>> $EE_COMMAND_LOG fi ;;