DaanHoogland commented on a change in pull request #2799: systemvmtemplate: new 
4.11.2 template and fixes
URL: https://github.com/apache/cloudstack/pull/2799#discussion_r210499666
 
 

 ##########
 File path: systemvm/debian/opt/cloud/bin/setup/postinit.sh
 ##########
 @@ -21,48 +21,25 @@
 # Eject cdrom if any
 eject || true
 
-# Setup router
-CMDLINE=/var/cache/cloud/cmdline
-for str in $(cat $CMDLINE)
-  do
-    KEY=$(echo $str | cut -d= -f1)
-    VALUE=$(echo $str | cut -d= -f2)
-    case $KEY in
-      type)
-        export TYPE=$VALUE
-        ;;
-      *)
-        ;;
-    esac
-done
-
+TYPE=$(grep -Po 'type=\K[a-zA-Z]*' $CMDLINE)
 if [ "$TYPE" == "router" ] || [ "$TYPE" == "vpcrouter" ] || [ "$TYPE" == 
"dhcpsrvr" ]
 then
   if [ -x /opt/cloud/bin/update_config.py ]
   then
       /opt/cloud/bin/update_config.py cmd_line.json || true
-      logger -t cloud "postinit: Updated config cmd_line.json"
   fi
 fi
 
-if [ "$TYPE" == "router" ]
-then
-    python /opt/cloud/bin/baremetal-vr.py &
-    logger -t cloud "Started baremetal-vr service"
-fi
-
 [ ! -f /var/cache/cloud/enabled_svcs ] && touch /var/cache/cloud/enabled_svcs
 for svc in $(cat /var/cache/cloud/enabled_svcs)
 do
-   logger -t cloud "Starting $svc"
-   systemctl enable --no-block --now $svc
+   systemctl enable --now --no-block $svc
 
 Review comment:
   is the change in the order of the arguments significant?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to