This is an automated email from the ASF dual-hosted git repository.

widodh pushed a commit to branch debian9-systemvmtemplate
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/debian9-systemvmtemplate by 
this push:
     new d333603  Disable most services by default and enable in 
cloud-early-config
d333603 is described below

commit d3336030b9d727117058acc2d4f4d66d747d0e96
Author: Wido den Hollander <w...@widodh.nl>
AuthorDate: Thu Aug 10 16:40:22 2017 +0200

    Disable most services by default and enable in cloud-early-config
    
    Not sure though if enabling them is enough for systemd to still start them
    on first boot
    
    Signed-off-by: Wido den Hollander <w...@widodh.nl>
---
 .../debian/config/etc/init.d/cloud-early-config    | 35 +++++-----------------
 .../configure_systemvm_services.sh                 |  6 ++--
 2 files changed, 11 insertions(+), 30 deletions(-)

diff --git a/systemvm/patches/debian/config/etc/init.d/cloud-early-config 
b/systemvm/patches/debian/config/etc/init.d/cloud-early-config
index 1d3a890..655266c 100755
--- a/systemvm/patches/debian/config/etc/init.d/cloud-early-config
+++ b/systemvm/patches/debian/config/etc/init.d/cloud-early-config
@@ -935,11 +935,8 @@ setup_router() {
   echo "$ETH0_IP $NAME" >> /etc/hosts
 
 
-  enable_svc dnsmasq 1
-  enable_svc haproxy 1
+  systemctl enable dnsmasq haproxy cloud-passwd-srvr
   enable_irqbalance 1
-  enable_svc cloud-passwd-srvr 1
-  enable_svc cloud 0
   disable_rpfilter_domR
   enable_fwding 1
   enable_rpsrfs 1
@@ -1028,12 +1025,9 @@ EOF
 
   setup_vpc_apache2
 
-  enable_svc dnsmasq 1
-  enable_svc haproxy 1
+  systemctl enable dnsmasq haproxy cloud-passwd-srvr
   enable_irqbalance 1
   enable_vpc_rpsrfs 1
-  enable_svc cloud 0
-  enable_svc cloud-passwd-srvr 1
   disable_rpfilter
   enable_fwding 1
   cp /etc/iptables/iptables-vpcrouter /etc/iptables/rules.v4
@@ -1078,11 +1072,8 @@ setup_dhcpsrvr() {
   [ $ETH0_IP ] && echo "$ETH0_IP $NAME" >> /etc/hosts
   [ $ETH0_IP6 ] && echo "$ETH0_IP6 $NAME" >> /etc/hosts
 
-  enable_svc dnsmasq 1
-  enable_svc haproxy 0
+  systemctl enable dnsmasq cloud-passwd-srvr
   enable_irqbalance 0
-  enable_svc cloud-passwd-srvr 1
-  enable_svc cloud 0
   enable_fwding 0
   systemctl disable nfs-common
 
@@ -1208,11 +1199,9 @@ CORS
 
   disable_rpfilter
   enable_fwding 0
-  enable_svc haproxy 0
+  systemctl disable haproxy dnsmasq cloud-passwd-srvr
+  systemctl enable cloud
   enable_irqbalance 0
-  enable_svc dnsmasq 0
-  enable_svc cloud-passwd-srvr 0
-  enable_svc cloud 1
   rm /etc/logrotate.d/cloud
   setup_ntp
 }
@@ -1233,13 +1222,10 @@ setup_console_proxy() {
     setup_sshd $ETH0_IP "eth0"
   fi
 
+  systemctl enable cloud
   disable_rpfilter
   enable_fwding 0
-  enable_svc haproxy 0
   enable_irqbalance 0
-  enable_svc dnsmasq 0
-  enable_svc cloud-passwd-srvr 0
-  enable_svc cloud 1
   systemctl disable nfs-common
   rm /etc/logrotate.d/cloud
 }
@@ -1263,11 +1249,7 @@ setup_elbvm() {
   fi
   
   enable_fwding 0
-  enable_svc haproxy 0
   enable_irqbalance 0
-  enable_svc dnsmasq 0
-  enable_svc cloud-passwd-srvr 0
-  enable_svc cloud 0
   systemctl disable nfs-common
   systemctl disable portmap
 }
@@ -1286,11 +1268,8 @@ setup_ilbvm() {
   setup_sshd $ETH1_IP "eth1"
   
   enable_fwding 0
-  enable_svc haproxy 1
+  systemctl enable haproxy
   enable_irqbalance 1
-  enable_svc dnsmasq 0
-  enable_svc cloud-passwd-srvr 0
-  enable_svc cloud 0
   systemctl disable nfs-common
   systemctl disable portmap
 }
diff --git 
a/tools/appliance/definitions/systemvmtemplate/configure_systemvm_services.sh 
b/tools/appliance/definitions/systemvmtemplate/configure_systemvm_services.sh
index 171c4b0..1386465 100644
--- 
a/tools/appliance/definitions/systemvmtemplate/configure_systemvm_services.sh
+++ 
b/tools/appliance/definitions/systemvmtemplate/configure_systemvm_services.sh
@@ -107,8 +107,8 @@ EOF
 
   systemctl daemon-reload
   systemctl enable cloud-early-config
-  systemctl enable cloud-passwd-srvr
-  systemctl enable cloud
+  systemctl disable cloud-passwd-srvr
+  systemctl disable cloud
 }
 
 function do_signature() {
@@ -143,6 +143,8 @@ function configure_services() {
   systemctl disable x11-common
   systemctl disable console-setup
   systemctl disable haproxy
+  systemctl disable apache2
+  systemctl disable dnsmasq
 
   # Hyperv kvp daemon - 64bit only
   local arch=`dpkg --print-architecture`

-- 
To stop receiving notification emails like this one, please contact
['"commits@cloudstack.apache.org" <commits@cloudstack.apache.org>'].

Reply via email to