Browse Source

Check if /etc/rc.local exists before running sed.
Closes #667

Raphael Schneeberger 6 năm trước cách đây
mục cha
commit
77a09a1838
2 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 1 1
      install/hst-install-debian.sh
  2. 1 1
      install/hst-install-ubuntu.sh

+ 1 - 1
install/hst-install-debian.sh

@@ -1377,7 +1377,7 @@ if [ "$named" = 'yes' ]; then
     check_result $? "bind9 start failed"
 
     # Workaround for OpenVZ/Virtuozzo
-    if [ -e "/proc/vz/veinfo" ]; then
+    if [ -e "/proc/vz/veinfo" ] && [ -e "/etc/rc.local" ]; then
         sed -i "s/^exit 0/service bind9 restart\nexit 0/" /etc/rc.local
     fi
 fi

+ 1 - 1
install/hst-install-ubuntu.sh

@@ -1354,7 +1354,7 @@ if [ "$named" = 'yes' ]; then
     check_result $? "bind9 start failed"
 
     # Workaround for OpenVZ/Virtuozzo
-    if [ -e "/proc/vz/veinfo" ]; then
+    if [ -e "/proc/vz/veinfo" ] && [ -e "/etc/rc.local" ]; then
         sed -i "s/^exit 0/service bind9 restart\nexit 0/" /etc/rc.local
     fi
 fi