~hp-moonshot/ubuntu/trusty/hp-moonshot/hp-proliant

« back to all changes in this revision

Viewing changes to debian/hp-proliant-maas-install/usr/bin/hp-proliant-maas-install

  • Committer: Narinder Gupta
  • Date: 2014-09-04 20:45:24 UTC
  • Revision ID: narinder.gupta@canonical.com-20140904204524-9vhqysvi3s3ig3fu
renaming file from hp-moonshot.conf to hp-proliant.conf 

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
# hp-proliant-maas-install - runs apt-get update, upgrade, and deploys the 
 
3
# hp-proliant package
 
4
#
 
5
# Authors: Kent Baxley <kent.baxley@canonical.com>
 
6
 
7
#    This program is free software: you can redistribute it and/or modify
 
8
#    it under the terms of the GNU General Public License as published by
 
9
#    the Free Software Foundation, version 3 of the License.
 
10
#
 
11
#    This program is distributed in the hope that it will be useful,
 
12
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
#    GNU General Public License for more details.
 
15
#
 
16
#    You should have received a copy of the GNU General Public License
 
17
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
18
 
 
19
# Only run this as root
 
20
if [ $EUID -ne 0 ]
 
21
then
 
22
        echo Execute as root or with \"sudo $0\"
 
23
        exit 1
 
24
fi
 
25
 
 
26
export DEBIAN_FRONTEND=noninteractive
 
27
 
 
28
apt-get update  --yes
 
29
apt-get upgrade --yes --force-yes
 
30
apt-get install hp-proliant --yes --force-yes
 
31
wait
 
32
 
 
33
#Try to bootstrap once we are done installing the hp-proliant package.
 
34
 
 
35
chown -R ubuntu:ubuntu /home/ubuntu/.juju
 
36
bootstrap="/usr/bin/hp-proliant-bootstrap-juju"
 
37
su - ubuntu -c "$bootstrap"
 
38