Configure route to vBRG via vBNG on vGMUX
[demo.git] / vnfs / vCPE / scripts / v_gmux_install.sh
1 #!/bin/bash
2
3 REPO_URL_BLOB=$(cat /opt/config/repo_url_blob.txt)
4 REPO_URL_ARTIFACTS=$(cat /opt/config/repo_url_artifacts.txt)
5 DEMO_ARTIFACTS_VERSION=$(cat /opt/config/demo_artifacts_version.txt)
6 INSTALL_SCRIPT_VERSION=$(cat /opt/config/install_script_version.txt)
7 VPP_SOURCE_REPO_URL=$(cat /opt/config/vpp_source_repo_url.txt)
8 VPP_SOURCE_REPO_BRANCH=$(cat /opt/config/vpp_source_repo_branch.txt)
9 VPP_PATCH_URL=$(cat /opt/config/vpp_patch_url.txt)
10 HC2VPP_SOURCE_REPO_URL=$(cat /opt/config/hc2vpp_source_repo_url.txt)
11 HC2VPP_SOURCE_REPO_BRANCH=$(cat /opt/config/hc2vpp_source_repo_branch.txt)
12 HC2VPP_PATCH_URL=$(cat /opt/config/hc2vpp_patch_url.txt)
13 LIBEVEL_PATCH_URL=$(cat /opt/config/libevel_patch_url.txt)
14 CLOUD_ENV=$(cat /opt/config/cloud_env.txt)
15 MUX_GW_IP=$(cat /opt/config/mux_gw_net_ipaddr.txt)
16 MUX_GW_CIDR=$(cat /opt/config/mux_gw_net_cidr.txt)
17 MUX_TO_BNG_IP=$(cat /opt/config/mux_to_bng_net_ipaddr.txt)
18 BNG_MUX_CIDR=$(cat /opt/config/bng_mux_net_cidr.txt)
19 BRG_BNG_CIDR=$(cat /opt/config/brg_bng_net_cidr.txt)
20 BNG_TO_MUX_IP=$(cat /opt/config/bng_to_mux_net_ipaddr.txt)
21
22 # Build states are:
23 # 'build' - just build the code
24 # 'done' - code is build, install and setup
25 # 'auto' - bulid, install and setup
26 BUILD_STATE="auto"
27 if [[ -f /opt/config/compile_state.txt ]]
28 then
29     BUILD_STATE=$(cat /opt/config/compile_state.txt)
30 fi
31
32 # Convert Network CIDR to Netmask
33 cdr2mask () {
34         # Number of args to shift, 255..255, first non-255 byte, zeroes
35         set -- $(( 5 - ($1 / 8) )) 255 255 255 255 $(( (255 << (8 - ($1 % 8))) & 255 )) 0 0 0
36         [ $1 -gt 1 ] && shift $1 || shift
37         echo ${1-0}.${2-0}.${3-0}.${4-0}
38 }
39
40 # OpenStack network configuration
41 if [[ $BUILD_STATE != "build" ]]
42 then
43     if [[ $CLOUD_ENV == "openstack" ]]
44     then
45         echo 127.0.0.1 $(hostname) >> /etc/hosts
46
47         # Allow remote login as root
48         mv /root/.ssh/authorized_keys /root/.ssh/authorized_keys.bk
49         cp /home/ubuntu/.ssh/authorized_keys /root/.ssh
50
51         MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1)
52
53         IP=$(cat /opt/config/oam_ipaddr.txt)
54         BITS=$(cat /opt/config/oam_cidr.txt | cut -d"/" -f2)
55         NETMASK=$(cdr2mask $BITS)
56         echo "auto eth2" >> /etc/network/interfaces
57         echo "iface eth2 inet static" >> /etc/network/interfaces
58         echo "    address $IP" >> /etc/network/interfaces
59         echo "    netmask $NETMASK" >> /etc/network/interfaces
60         echo "    mtu $MTU" >> /etc/network/interfaces
61
62         ifup eth2
63     fi
64 fi  # endif BUILD_STATE != "build"
65
66 if [[ $BUILD_STATE != "done" ]]
67 then
68     # Download required dependencies
69     echo "deb http://ppa.launchpad.net/openjdk-r/ppa/ubuntu $(lsb_release -c -s) main" >>  /etc/apt/sources.list.d/java.list
70     echo "deb-src http://ppa.launchpad.net/openjdk-r/ppa/ubuntu $(lsb_release -c -s) main" >>  /etc/apt/sources.list.d/java.list
71     apt-get update
72     apt-get install --allow-unauthenticated -y wget openjdk-8-jdk apt-transport-https ca-certificates g++ libcurl4-gnutls-dev
73     sleep 1
74
75     # Install the tools required for download codes
76     apt-get install -y expect git patch make linux-image-extra-`uname -r`
77
78     #Download and build the VPP codes
79     cd /opt
80     git clone ${VPP_SOURCE_REPO_URL} -b ${VPP_SOURCE_REPO_BRANCH} vpp
81     wget -O Vpp-Add-VES-agent-for-vG-MUX.patch ${VPP_PATCH_URL} 
82
83     cd vpp
84     patch -p1 < ../Vpp-Add-VES-agent-for-vG-MUX.patch
85     expect -c "
86             spawn make install-dep;
87             expect {
88                     \"Do you want to continue?*\" {send \"Y\r\"; interact}
89             }
90     "
91
92     # Install the evel-library first since we need the lib
93     cd /opt
94     apt-get install -y libcurl4-openssl-dev
95     git clone http://gerrit.onap.org/r/demo
96     wget -O vCPE-vG-MUX-libevel-fixup.patch ${LIBEVEL_PATCH_URL} 
97     cd demo
98     patch -p1 < ../vCPE-vG-MUX-libevel-fixup.patch
99     cd vnfs/VES5.0/evel/evel-library/bldjobs 
100     make
101     cp ../libs/x86_64/libevel.so /usr/lib
102     ldconfig
103
104     cd /opt/vpp/build-root
105     ./bootstrap.sh
106     make V=0 PLATFORM=vpp TAG=vpp install-deb
107
108     # Install the VPP package
109     apt install -y python-ply-lex-3.5 python-ply-yacc-3.5 python-pycparser python-cffi
110     dpkg -i *.deb
111     systemctl stop vpp
112 fi  # endif BUILD_STATE != "done"
113
114 if [[ $BUILD_STATE != "build" ]]
115 then
116     # Auto-start configuration for the VPP
117     cat > /etc/vpp/startup.conf << EOF
118
119 unix {
120   nodaemon
121   log /tmp/vpp.log
122   full-coredump
123   cli-listen localhost:5002
124   startup-config /etc/vpp/setup.gate
125 }
126
127 api-trace {
128   on
129 }
130
131 api-segment {
132   gid vpp
133 }
134
135 cpu {
136         ## In the VPP there is one main thread and optionally the user can create worker(s)
137         ## The main thread and worker thread(s) can be pinned to CPU core(s) manually or automatically
138
139         ## Manual pinning of thread(s) to CPU core(s)
140
141         ## Set logical CPU core where main thread runs
142         # main-core 1
143
144         ## Set logical CPU core(s) where worker threads are running
145         # corelist-workers 2-3,18-19
146
147         ## Automatic pinning of thread(s) to CPU core(s)
148
149         ## Sets number of CPU core(s) to be skipped (1 ... N-1)
150         ## Skipped CPU core(s) are not used for pinning main thread and working thread(s).
151         ## The main thread is automatically pinned to the first available CPU core and worker(s)
152         ## are pinned to next free CPU core(s) after core assigned to main thread
153         # skip-cores 4
154
155         ## Specify a number of workers to be created
156         ## Workers are pinned to N consecutive CPU cores while skipping "skip-cores" CPU core(s)
157         ## and main thread's CPU core
158         # workers 2
159
160         ## Set scheduling policy and priority of main and worker threads
161
162         ## Scheduling policy options are: other (SCHED_OTHER), batch (SCHED_BATCH)
163         ## idle (SCHED_IDLE), fifo (SCHED_FIFO), rr (SCHED_RR)
164         # scheduler-policy fifo
165
166         ## Scheduling priority is used only for "real-time policies (fifo and rr),
167         ## and has to be in the range of priorities supported for a particular policy
168         # scheduler-priority 50
169 }
170
171 # dpdk {
172         ## Change default settings for all intefaces
173         # dev default {
174                 ## Number of receive queues, enables RSS
175                 ## Default is 1
176                 # num-rx-queues 3
177
178                 ## Number of transmit queues, Default is equal
179                 ## to number of worker threads or 1 if no workers treads
180                 # num-tx-queues 3
181
182                 ## Number of descriptors in transmit and receive rings
183                 ## increasing or reducing number can impact performance
184                 ## Default is 1024 for both rx and tx
185                 # num-rx-desc 512
186                 # num-tx-desc 512
187
188                 ## VLAN strip offload mode for interface
189                 ## Default is off
190                 # vlan-strip-offload on
191         # }
192
193         ## Whitelist specific interface by specifying PCI address
194         # dev 0000:02:00.0
195
196         ## Whitelist specific interface by specifying PCI address and in
197         ## addition specify custom parameters for this interface
198         # dev 0000:02:00.1 {
199         #       num-rx-queues 2
200         # }
201
202         ## Change UIO driver used by VPP, Options are: igb_uio, vfio-pci
203         ## and uio_pci_generic (default)
204         # uio-driver vfio-pci
205
206         ## Disable mutli-segment buffers, improves performance but
207         ## disables Jumbo MTU support
208         # no-multi-seg
209
210         ## Increase number of buffers allocated, needed only in scenarios with
211         ## large number of interfaces and worker threads. Value is per CPU socket.
212         ## Default is 16384
213         # num-mbufs 128000
214
215         ## Change hugepages allocation per-socket, needed only if there is need for
216         ## larger number of mbufs. Default is 256M on each detected CPU socket
217         # socket-mem 2048,2048
218 # }
219
220 EOF
221
222     # Get list of network device PCI bus addresses
223     get_nic_pci_list() {
224         while read -r line ; do
225             if [ "$line" != "${line#*network device}" ]; then
226                 echo -n "${line%% *} "
227             fi
228         done < <(lspci)
229     }
230
231     NICS=$(get_nic_pci_list)
232     NICS=`echo ${NICS} | sed 's/[0]\+\([0-9]\)/\1/g' | sed 's/[.:]/\//g'`
233
234     BNG_MUX_NIC=GigabitEthernet`echo ${NICS} | cut -d " " -f 2`  # second interface in list
235     MUX_GW_NIC=GigabitEthernet`echo ${NICS} | cut -d " " -f 4`   # fourth interface in list
236
237     cat > /etc/vpp/setup.gate << EOF
238 set int state ${BNG_MUX_NIC} up
239 set int ip address ${BNG_MUX_NIC} ${MUX_TO_BNG_IP}/${BNG_MUX_CIDR#*/}
240
241 set int state ${MUX_GW_NIC} up
242 set int ip address ${MUX_GW_NIC} ${MUX_GW_IP}/${MUX_GW_CIDR#*/}
243 ip route add ${BRG_BNG_CIDR} via ${BNG_TO_MUX_IP} ${BNG_MUX_NIC}
244 EOF
245
246 fi  # endif BUILD_STATE != "build"
247
248 if [[ $BUILD_STATE != "done" ]]
249 then
250     # Download and install HC2VPP from source
251     cd /opt
252     git clone ${HC2VPP_SOURCE_REPO_URL} -b ${HC2VPP_SOURCE_REPO_BRANCH} hc2vpp
253     wget -O Hc2vpp-Add-VES-agent-for-vG-MUX.patch ${HC2VPP_PATCH_URL}
254
255     apt-get install -y maven
256     mkdir -p ~/.m2
257     cat > ~/.m2/settings.xml << EOF
258 <?xml version="1.0" encoding="UTF-8"?>
259 <!-- vi: set et smarttab sw=2 tabstop=2: -->
260 <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
261   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
262   xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
263
264   <profiles>
265     <profile>
266       <id>fd.io-release</id>
267       <repositories>
268         <repository>
269           <id>fd.io-mirror</id>
270           <name>fd.io-mirror</name>
271           <url>https://nexus.fd.io/content/groups/public/</url>
272           <releases>
273             <enabled>true</enabled>
274             <updatePolicy>never</updatePolicy>
275           </releases>
276           <snapshots>
277             <enabled>false</enabled>
278           </snapshots>
279         </repository>
280       </repositories>
281       <pluginRepositories>
282         <pluginRepository>
283           <id>fd.io-mirror</id>
284           <name>fd.io-mirror</name>
285           <url>https://nexus.fd.io/content/repositories/public/</url>
286           <releases>
287             <enabled>true</enabled>
288             <updatePolicy>never</updatePolicy>
289           </releases>
290           <snapshots>
291             <enabled>false</enabled>
292           </snapshots>
293         </pluginRepository>
294       </pluginRepositories>
295     </profile>
296
297     <profile>
298       <id>fd.io-snapshots</id>
299       <repositories>
300         <repository>
301           <id>fd.io-snapshot</id>
302           <name>fd.io-snapshot</name>
303           <url>https://nexus.fd.io/content/repositories/fd.io.snapshot/</url>
304           <releases>
305             <enabled>false</enabled>
306           </releases>
307           <snapshots>
308             <enabled>true</enabled>
309           </snapshots>
310         </repository>
311       </repositories>
312       <pluginRepositories>
313         <pluginRepository>
314           <id>fd.io-snapshot</id>
315           <name>fd.io-snapshot</name>
316           <url>https://nexus.fd.io/content/repositories/fd.io.snapshot/</url>
317           <releases>
318             <enabled>false</enabled>
319           </releases>
320           <snapshots>
321             <enabled>true</enabled>
322           </snapshots>
323         </pluginRepository>
324       </pluginRepositories>
325     </profile>
326     <profile>
327       <id>opendaylight-snapshots</id>
328       <repositories>
329         <repository>
330           <id>opendaylight-snapshot</id>
331           <name>opendaylight-snapshot</name>
332           <url>https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url>
333           <releases>
334             <enabled>false</enabled>
335           </releases>
336           <snapshots>
337             <enabled>true</enabled>
338           </snapshots>
339         </repository>
340       </repositories>
341       <pluginRepositories>
342         <pluginRepository>
343           <id>opendaylight-shapshot</id>
344           <name>opendaylight-snapshot</name>
345           <url>https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url>
346           <releases>
347             <enabled>false</enabled>
348           </releases>
349           <snapshots>
350             <enabled>true</enabled>
351           </snapshots>
352         </pluginRepository>
353       </pluginRepositories>
354     </profile>
355   </profiles>
356
357   <activeProfiles>
358     <activeProfile>fd.io-release</activeProfile>
359     <activeProfile>fd.io-snapshots</activeProfile>
360     <activeProfile>opendaylight-snapshots</activeProfile>
361   </activeProfiles>
362 </settings>
363 EOF
364
365     cd hc2vpp
366     patch -p1 < ../Hc2vpp-Add-VES-agent-for-vG-MUX.patch
367     p_version_snap=$(cat ves/ves-impl/pom.xml | grep -A 1 "jvpp-ves" | tail -1)
368     p_version_snap=$(echo "${p_version_snap%<*}")
369     p_version_snap=$(echo "${p_version_snap#*>}")
370     p_version=$(echo "${p_version_snap%-*}")
371     mkdir -p  ~/.m2/repository/io/fd/vpp/jvpp-ves/${p_version_snap}
372     mvn install:install-file -Dfile=/usr/share/java/jvpp-ves-${p_version}.jar -DgroupId=io.fd.vpp -DartifactId=jvpp-ves -Dversion=${p_version_snap} -Dpackaging=jar
373     mvn clean install -nsu -DskipTests=true
374     l_version=$(cat pom.xml | grep "<version>" | head -1)
375     l_version=$(echo "${l_version%<*}")
376     l_version=$(echo "${l_version#*>}")
377     mv vpp-integration/minimal-distribution/target/vpp-integration-distribution-${l_version}-hc/vpp-integration-distribution-${l_version} /opt/honeycomb
378     sed -i 's/127.0.0.1/0.0.0.0/g' /opt/honeycomb/config/honeycomb.json
379
380     # Disable automatic upgrades
381     if [[ $CLOUD_ENV != "rackspace" ]]
382     then
383         echo "APT::Periodic::Unattended-Upgrade \"0\";" >> /etc/apt/apt.conf.d/10periodic
384         sed -i 's/\(APT::Periodic::Unattended-Upgrade\) "1"/\1 "0"/' /etc/apt/apt.conf.d/20auto-upgrades
385     fi
386 fi  # endif BUILD_STATE != "done"
387
388 if [[ $BUILD_STATE != "build" ]]
389 then
390     # Create systemctl service for Honeycomb
391     cat > /etc/systemd/system/honeycomb.service << EOF
392 [Unit]
393 Description=Honeycomb Agent for the VPP control plane
394 Documentation=https://wiki.fd.io/view/Honeycomb
395 Requires=vpp.service
396 After=vpp.service
397
398 [Service]
399 ExecStart=/opt/honeycomb/honeycomb
400 Restart=always
401 RestartSec=10
402
403 [Install]
404 WantedBy=multi-user.target
405 EOF
406     systemctl enable /etc/systemd/system/honeycomb.service
407
408     #Create a systemd service for auto-save
409     cat > /usr/bin/save_config << EOF
410 #!/bin/bash
411
412 #########################################################################
413 #
414 #  Copyright (c) 2017 Intel and/or its affiliates.
415
416 #  Licensed under the Apache License, Version 2.0 (the "License");
417 #  you may not use this file except in compliance with the License.
418 #  You may obtain a copy of the License at:
419
420 #      http://www.apache.org/licenses/LICENSE-2.0
421
422 #  Unless required by applicable law or agreed to in writing, software
423 #  distributed under the License is distributed on an "AS IS" BASIS,
424 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
425 #  See the License for the specific language governing permissions and
426 #  limitations under the License.
427 #
428 ##########################################################################
429
430 ############################### Variables ################################
431 VPP_SETUP_GATE=/etc/vpp/setup.gate
432
433 ############################### Functions ################################
434
435 # Write the commands to the startup scripts.
436 #
437 # We could set VPP configuration to the startup.conf.
438 # Write the configuration to the startup scripts so we could
439 # restore the system after rebooting.
440 #
441 write_startup_scripts()
442 {
443         local cmd=\${2}
444         local is_add=\${1}
445
446         if [[ \${is_add} == add ]] ;then
447                 while read -r line
448                 do
449                         if [[ \${line} == \${cmd} ]] ;then
450                                 return 0
451                         fi
452                 done < \${VPP_SETUP_GATE}
453
454                 echo "\${cmd}" >> \${VPP_SETUP_GATE}
455         else
456                 while read -r line
457                 do
458                         if [[ \${line} == \${cmd} ]] ;then
459                                 sed -i "/\${line}/d" \${VPP_SETUP_GATE}
460                                 return 0
461                         fi
462                 done < \${VPP_SETUP_GATE}
463         fi
464 }
465
466 # Saves the VES agent configuration to the startup script.
467 #
468 # Get the current VES agent configuration from the bash command:
469 # \$vppctl show ves agent
470 #    Server Addr    Server Port Interval Enabled
471 #    127.0.0.1        8080         10    True
472 # Set the VES agent configuration with the bash command:
473 # \$vppctl set ves agent server 127.0.0.1 port 8080 intval 10
474 #
475 save_ves_config()
476 {
477         local server=""
478         local port=""
479         local intval=""
480
481         local ves_config=\`vppctl show ves agent | head -2 | tail -1\`
482         if [ "\${ves_config}" != "" ] ;then
483                 server=\`echo \${ves_config} | awk '{ print \$1 }'\`
484                 port=\`echo \${ves_config} | awk '{ print \$2 }'\`
485                 intval=\`echo \${ves_config} | awk '{ print \$3 }'\`
486                 write_startup_scripts add "set ves agent server \${server} port \${port} intval \${intval}"
487         fi
488 }
489
490 # Save the VxLAN Tunnel Configuration to the startup script.
491 #
492 # Get the current VxLAN tunnel configuration with bash command:
493 # \$vppctl show vxlan tunnel
494 #  [0] src 10.3.0.2 dst 10.1.0.20 vni 100 sw_if_index 1 encap_fib_index 0 fib_entry_index 7 decap_next l2
495 #  [1] src 10.5.0.20 dst 10.5.0.21 vni 100 sw_if_index 2 encap_fib_index 0 fib_entry_index 8 decap_next l2
496 # Set the VxLAN Tunnel with the bash command:
497 # \$vppctl create vxlan tunnel src 10.3.0.2 dst 10.1.0.20 vni 100
498 # vxlan_tunnel0
499 save_vxlan_tunnel()
500 {
501         local src=""
502         local dst=""
503         local vni=""
504
505         vppctl show vxlan tunnel | while read line
506         do
507                 if [ "\${line}" != "" ] ;then
508                         src=\`echo \${line} | awk '{ print \$3 }'\`
509                         dst=\`echo \${line} | awk '{ print \$5 }'\`
510                         vni=\`echo \${line} | awk '{ print \$7 }'\`
511
512                         write_startup_scripts add "create vxlan tunnel src \${src} dst \${dst} vni \${vni}"
513                 fi
514         done
515 }
516
517 # Save the VxLAN tunnel L2 xconnect configuration to the startup script.
518 #
519 # Get the Current L2 Address configuration with bash command:
520 # \$vppctl show int addr
521 # local0 (dn):
522 # vxlan_tunnel0 (up):
523 #   l2 xconnect vxlan_tunnel1
524 # vxlan_tunnel1 (up):
525 #   l2 xconnect vxlan_tunnel0
526 # Save the VxLAN tunnel L2 xconnect configuration with bash command:
527 # \$vppctl set interface l2 xconnect vxlan_tunnel0 vxlan_tunnel1
528 #
529 save_vxlan_xconnect()
530 {
531         local ingress=""
532         local egress=""
533
534         vppctl show int addr | while read line
535         do
536                 if [[ \${line} == vxlan_tunnel* ]] ;then
537                         read next
538                         while [[ \${next} != l2* ]] || [[ \${next} == "" ]]
539                         do
540                                 line=\`echo \${next}\`
541                                 read next
542                         done
543                         if [[ \${next} == l2* ]] ;then
544                                 ingress=\`echo \${line} | awk '{ print \$1 }'\`
545                                 egress=\`echo \${next} | awk '{ print \$3 }'\`
546                                 write_startup_scripts add "set interface l2 xconnect \${ingress} \${egress}"
547                         fi
548                 fi
549         done
550 }
551
552 ################################# MAIN ###################################
553
554 save_ves_config
555
556 save_vxlan_tunnel
557
558 save_vxlan_xconnect
559
560 EOF
561     chmod a+x /usr/bin/save_config
562     cat > /etc/systemd/system/autosave.service << EOF
563 [Unit]
564 Description=Run Scripts at Start and Stop
565 Requires=vpp.service
566 After=vpp.service
567
568 [Service]
569 Type=oneshot
570 RemainAfterExit=true
571 ExecStop=/usr/bin/save_config
572
573 [Install]
574 WantedBy=multi-user.target
575 EOF
576     systemctl enable /etc/systemd/system/autosave.service
577
578     # Download DHCP config files
579     cd /opt
580     wget $REPO_URL_BLOB/org.onap.demo/vnfs/vcpe/$INSTALL_SCRIPT_VERSION/v_gmux_init.sh
581     wget $REPO_URL_BLOB/org.onap.demo/vnfs/vcpe/$INSTALL_SCRIPT_VERSION/v_gmux.sh
582     chmod +x v_gmux_init.sh
583     chmod +x v_gmux.sh
584     mv v_gmux.sh /etc/init.d
585     update-rc.d v_gmux.sh defaults
586
587     # Rename network interface in openstack Ubuntu 16.04 images. Then, reboot the VM to pick up changes
588     if [[ $CLOUD_ENV != "rackspace" ]]
589     then
590         sed -i "s/GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX=\"net.ifnames=0 biosdevname=0\"/g" /etc/default/grub
591         grub-mkconfig -o /boot/grub/grub.cfg
592         sed -i "s/ens[0-9]*/eth0/g" /etc/network/interfaces.d/*.cfg
593         sed -i "s/ens[0-9]*/eth0/g" /etc/udev/rules.d/70-persistent-net.rules
594         echo 'network: {config: disabled}' >> /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg
595         reboot
596     fi
597
598     ./v_gmux_init.sh
599 fi  # endif BUILD_STATE != "build"