Merge "build: Use git submodules for Fuel git repos"
[fuel.git] / build / f_repos / patch / fuel-main / 0001-OPNFV-Additions-to-bootstrap_admin_node.sh.patch
1 From: Fuel OPNFV <fuel@opnfv.org>
2 Date: Mon, 13 Jun 2016 22:23:57 +0200
3 Subject: [PATCH] OPNFV: Additions to bootstrap_admin_node.sh
4
5 ---
6  iso/bootstrap_admin_node.sh | 39 +++++++++++++++++++++++++++++++--------
7  1 file changed, 31 insertions(+), 8 deletions(-)
8
9 diff --git a/iso/bootstrap_admin_node.sh b/iso/bootstrap_admin_node.sh
10 index 3197c91..db3123d 100755
11 --- a/iso/bootstrap_admin_node.sh
12 +++ b/iso/bootstrap_admin_node.sh
13 @@ -339,8 +339,22 @@ fuelmenu --save-only --iface=$ADMIN_INTERFACE || fail
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 || fail
33 +  fuelmenu
34  else
35    # Give user 15 seconds to enter fuelmenu or else continue
36    echo
37 @@ -360,9 +374,10 @@ else
38    fi
39  fi
40
41 +# OPNFV: Disabled to speedup installation in offline env.
42  # Enable online base MOS repos (security, updates) if we run an ISO installation
43 -[ -f /etc/fuel_build_id ] && \
44 -  yum-config-manager --enable mos${FUEL_RELEASE}-security mos${FUEL_RELEASE}-updates --save
45 +#[ -f /etc/fuel_build_id ] && \
46 +#  yum-config-manager --enable mos${FUEL_RELEASE}-security mos${FUEL_RELEASE}-updates --save
47
48  if [ ! -f "${ASTUTE_YAML}" ]; then
49    echo ${fuelmenu_fail_message}
50 @@ -377,9 +392,7 @@ if [ ! -f /etc/fuel_build_id ]; then
51    ln -s ${wwwdir}/${OPENSTACK_VERSION}/ubuntu ${wwwdir}/ubuntu
52  fi
53
54 -# Enable sshd
55 -systemctl enable sshd
56 -systemctl start sshd
57 +systemctl reload sshd
58
59  # Enable iptables
60  systemctl enable iptables.service
61 @@ -532,6 +545,16 @@ systemctl start ntpd
62
63  bash /etc/rc.local
64
65 +### OPNFV addition BEGIN
66 +shopt -s nullglob
67 +for script in /opt/opnfv/bootstrap/post.d/*.sh
68 +do
69 +  echo "Post script: $script" >> /root/post.log 2>&1
70 +  $script >> /root/post.log 2>&1
71 +done
72 +shopt -u nullglob
73 +### OPNFV addition END
74 +
75  if [ "`get_bootstrap_skip`" = "False" ]; then
76    build_ubuntu_bootstrap bs_status || true
77  else
78 @@ -540,8 +563,8 @@ else
79  fi
80
81  #Check if repo is accessible
82 -echo "Checking for access to updates repository..."
83 -repourl=$(yum repolist all -v | awk '{if ($1 ~ "baseurl" && $3 ~ "updates") print $3}' | head -1)
84 +echo "Checking for access to updates repository/mirrorlist..."
85 +repourl=$(yum repolist all -v | awk '{if ($1 ~ "baseurl|mirrors" && $3 ~ "updates") print $3}' | head -1)
86  if urlaccesscheck check "$repourl" ; then
87    UPDATE_ISSUES=0
88  else