Restart sshd service instead of reload
[fuel.git] / build / patch-repos / 0010-bootstrap_admin_node.sh.patch
1 From: Fuel OPNFV <fuel@opnfv.org>
2 Date: Mon, 13 Jun 2016 22:23:57 +0200
3 Subject: OPNFV: Additions to bootstrap_admin_node.sh
4
5 ---
6 diff --git a/iso/bootstrap_admin_node.sh b/iso/bootstrap_admin_node.sh
7 index 3197c91..e035145 100755
8 --- a/iso/bootstrap_admin_node.sh
9 +++ b/iso/bootstrap_admin_node.sh
10 @@ -339,8 +339,22 @@ fuelmenu --save-only --iface=$ADMIN_INTERFACE || fail
11  set +x
12  echo "Done!"
13
14 +### OPNFV addition BEGIN
15 +shopt -s nullglob
16 +for script in /opt/opnfv/bootstrap/pre.d/*.sh
17 +do
18 +  echo "Pre script: $script" >> /root/pre.log 2>&1
19 +  $script >> /root/pre.log 2>&1
20 +done
21 +shopt -u nullglob
22 +### OPNFV addition END
23 +
24 +# Enable sshd
25 +systemctl enable sshd
26 +systemctl start sshd
27 +
28  if [[ "$showmenu" == "yes" || "$showmenu" == "YES" ]]; then
29 -  fuelmenu || fail
30 +  fuelmenu
31  else
32    # Give user 15 seconds to enter fuelmenu or else continue
33    echo
34 @@ -360,9 +374,10 @@ else
35    fi
36  fi
37
38 +# OPNFV: Disabled to speedup installation in offline env.
39  # Enable online base MOS repos (security, updates) if we run an ISO installation
40 -[ -f /etc/fuel_build_id ] && \
41 -  yum-config-manager --enable mos${FUEL_RELEASE}-security mos${FUEL_RELEASE}-updates --save
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 @@ -377,7 +392,5 @@ if [ ! -f /etc/fuel_build_id ]; then
48
49 -# Enable sshd
50 -systemctl enable sshd
51 -systemctl start sshd
52 +systemctl restart sshd
53
54  # Enable iptables
55  systemctl enable iptables.service
56 @@ -532,6 +545,16 @@ systemctl start ntpd
57
58  bash /etc/rc.local
59
60 +### OPNFV addition BEGIN
61 +shopt -s nullglob
62 +for script in /opt/opnfv/bootstrap/post.d/*.sh
63 +do
64 +  echo "Post script: $script" >> /root/post.log 2>&1
65 +  $script >> /root/post.log 2>&1
66 +done
67 +shopt -u nullglob
68 +### OPNFV addition END
69 +
70  if [ "`get_bootstrap_skip`" = "False" ]; then
71    build_ubuntu_bootstrap bs_status || true
72  else
73 @@ -571,8 +571,8 @@
74  fi
75
76  #Check if repo is accessible
77 -echo "Checking for access to updates repository..."
78 -repourl=$(yum repolist all -v | awk '{if ($1 ~ "baseurl" && $3 ~ "updates") print $3}' | head -1)
79 +echo "Checking for access to updates repository/mirrorlist..."
80 +repourl=$(yum repolist all -v | awk '{if ($1 ~ "baseurl|mirrors" && $3 ~ "updates") print $3}' | head -1)
81  if urlaccesscheck check "$repourl" ; then
82    UPDATE_ISSUES=0
83  else