[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-10013?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16301451#comment-16301451
 ] 

ASF GitHub Bot commented on CLOUDSTACK-10013:
---------------------------------------------

rhtyd commented on a change in pull request #2211: CLOUDSTACK-10013: Migrate 
systemvmtemplate to Debian9
URL: https://github.com/apache/cloudstack/pull/2211#discussion_r158494158
 
 

 ##########
 File path: systemvm/patches/debian/config/etc/init.d/cloud-early-config
 ##########
 @@ -48,71 +41,45 @@ log_it() {
   log_action_msg "$@"
 }
 
-init_interfaces_orderby_macs() {
-    macs=( $(echo $1 | sed "s/|/ /g") )
-    total_nics=${#macs[@]}
-    interface_file=${2:-"/etc/network/interfaces"}
-    rule_file=${3:-"/etc/udev/rules.d/70-persistent-net.rules"}
-    
-    echo -n "auto lo" > $interface_file
-    for((i=0; i<total_nics; i++))
-    do
-        if [[ $i < 3 ]] 
-        then
-           echo -n " eth$i" >> $interface_file
-        fi
-    done
-    cat >> $interface_file << EOF
-
-iface lo inet loopback
-
-EOF
-
-    echo "" > $rule_file
-    for((i=0; i < ${#macs[@]}; i++))
-    do
-        echo "SUBSYSTEM==\"net\", ACTION==\"add\", DRIVERS==\"?*\", 
ATTR{address}==\"${macs[$i]}\", NAME=\"eth$i\"" >> $rule_file 
-    done
-}
-
-init_interfaces() {
-  if [ "$NIC_MACS" == "" ]
-  then
-    cat > /etc/network/interfaces << EOF
-auto lo $1 $2 $3
-iface lo inet loopback
-
-EOF
-  else
-    init_interfaces_orderby_macs "$NIC_MACS"
-  fi
-}
-
 hypervisor() {
-  [ -d /proc/xen ] && mount -t xenfs none /proc/xen
-  [ -d /proc/xen ] && echo "xen-domU" && return 0
-
   local try=$([ -x /usr/sbin/virt-what ] && virt-what | tail -1)
   [ "$try" != "" ] && echo $try && return 0
 
-  vmware-checkvm &> /dev/null && echo "vmware" && return 0
-
   grep -q QEMU /proc/cpuinfo  && echo "kvm" && return 0
   grep -q QEMU /var/log/messages && echo "kvm" && return 0
 
+  [ -d /proc/xen ] && mount -t xenfs none /proc/xen
+  [ -d /proc/xen ] && echo "xen-domU" && return 0
+
+  vmware-checkvm &> /dev/null && echo "vmware" && return 0
+
   echo "unknown" && return 1
+}
 
+config_guest() {
+  if [ "$HYPERVISOR" == "kvm" ]
+  then
+    # Configure hot-plug
+    modprobe acpiphp || true
+    modprobe pci_hotplug || true
+    # Configure serial console FIXME: remove during build we enable it?
 
 Review comment:
   Not applicable for current state as they've been all fixed now :)

----------------------------------------------------------------
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]


> Migrate to Debian9 systemvmtemplate
> -----------------------------------
>
>                 Key: CLOUDSTACK-10013
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10013
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>            Reporter: Rohit Yadav
>            Assignee: Rohit Yadav
>             Fix For: Future, 4.11.0.0
>
>
> Migrate to debian9 based systemvmtemplate



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to