repobuild: Allow customizing fuel-mirror repo URL
[fuel.git] / build / bootstrap_admin_node.sh.patch
1 *** bootstrap_admin_node.sh.orig        Mon May 30 06:31:38 2016
2 --- bootstrap_admin_node.sh     Mon May 30 06:35:11 2016
3 ***************
4 *** 339,346 ****
5   set +x
6   echo "Done!"
7   
8   if [[ "$showmenu" == "yes" || "$showmenu" == "YES" ]]; then
9 !   fuelmenu || fail
10   else
11     # Give user 15 seconds to enter fuelmenu or else continue
12     echo
13 --- 339,360 ----
14   set +x
15   echo "Done!"
16   
17 + ### OPNFV addition BEGIN
18 + shopt -s nullglob
19 + for script in /opt/opnfv/bootstrap/pre.d/*.sh
20 + do
21 +   echo "Pre script: $script" >> /root/pre.log 2>&1
22 +   $script >> /root/pre.log 2>&1
23 + done
24 + shopt -u nullglob
25 + ### OPNFV addition END
26
27 + # Enable sshd
28 + systemctl enable sshd
29 + systemctl start sshd
30
31   if [[ "$showmenu" == "yes" || "$showmenu" == "YES" ]]; then
32 !   fuelmenu
33   else
34     # Give user 15 seconds to enter fuelmenu or else continue
35     echo
36 ***************
37 *** 360,368 ****
38     fi
39   fi
40
41   # Enable online base MOS repos (security, updates) if we run an ISO installation
42 ! [ -f /etc/fuel_build_id ] && \
43 !   yum-config-manager --enable mos${FUEL_RELEASE}-security mos${FUEL_RELEASE}-updates --save
44
45   if [ ! -f "${ASTUTE_YAML}" ]; then
46     echo ${fuelmenu_fail_message}
47 --- 360,369 ----
48     fi
49   fi
50
51 + # OPNFV: Disabled to speedup installation in offline env.
52   # Enable online base MOS repos (security, updates) if we run an ISO installation
53 ! #[ -f /etc/fuel_build_id ] && \
54 ! #  yum-config-manager --enable mos${FUEL_RELEASE}-security mos${FUEL_RELEASE}-updates --save
55
56   if [ ! -f "${ASTUTE_YAML}" ]; then
57     echo ${fuelmenu_fail_message}
58 ***************
59 *** 374,382 ****
60   [ ! -f /etc/fuel_build_id ] && \
61     sed -i "s|127.0.0.1:8080/ubuntu/x86_64|mirror.fuel-infra.org/mos-repos/ubuntu/${FUEL_RELEASE}|g" "${ASTUTE_YAML}"
62   
63 ! # Enable sshd
64 ! systemctl enable sshd
65 ! systemctl start sshd
66   
67   # Enable iptables
68   systemctl enable iptables.service
69 --- 388,394 ----
70   [ ! -f /etc/fuel_build_id ] && \
71     sed -i "s|127.0.0.1:8080/ubuntu/x86_64|mirror.fuel-infra.org/mos-repos/ubuntu/${FUEL_RELEASE}|g" "${ASTUTE_YAML}"
72   
73 ! systemctl reload sshd
74   
75   # Enable iptables
76   systemctl enable iptables.service
77 ***************
78 *** 529,534 ****
79 --- 541,556 ----
80   
81   bash /etc/rc.local
82   
83 + ### OPNFV addition BEGIN
84 + shopt -s nullglob
85 + for script in /opt/opnfv/bootstrap/post.d/*.sh
86 + do
87 +   echo "Post script: $script" >> /root/post.log 2>&1
88 +   $script >> /root/post.log 2>&1
89 + done
90 + shopt -u nullglob
91 + ### OPNFV addition END
92
93   if [ "`get_bootstrap_skip`" = "False" ]; then
94     build_ubuntu_bootstrap bs_status || true
95   else