Merge changes from topic 'remote-libvirt-support'
[fuel.git] / build / f_isoroot / f_bootstrap / post-scripts / 03_install_repo.sh
1 #/bin/sh
2 ##############################################################################
3 # Copyright (c) 2015 Ericsson AB and others.
4 # stefan.k.berg@ericsson.com
5 # jonas.bjurel@ericsson.com
6 # All rights reserved. This program and the accompanying materials
7 # are made available under the terms of the Apache License, Version 2.0
8 # which accompanies this distribution, and is available at
9 # http://www.apache.org/licenses/LICENSE-2.0
10 ##############################################################################
11
12 echo "Installing pre-build repo"
13 if [ ! -d /opt/opnfv/nailgun ]; then
14   echo "Error - found no repo!"
15   exit 1
16 fi
17
18 mkdir -p /var/www/nailgun
19 mv /opt/opnfv/nailgun/* /var/www/nailgun
20 if [ $? -ne 0 ]; then
21   echo "Error moving repos to their correct location!"
22   exit 1
23 fi
24 rmdir /opt/opnfv/nailgun
25 if [ $? -ne 0 ]; then
26   echo "Error removing /opt/opnfv/nailgun directory!"
27   exit 1
28 fi
29 mv /opt/opnfv/fuel_bootstrap_cli.yaml /etc/fuel-bootstrap-cli/fuel_bootstrap_cli.yaml
30 if [ $? -ne 0 ]; then
31   echo "Error moving bootstrap image configuration!"
32   exit 1
33 fi
34 echo "Done installing pre-build repo"