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

« back to all changes in this revision

Viewing changes to debian/preinst

  • Committer: Narinder Gupta
  • Date: 2014-09-04 20:37:03 UTC
  • Revision ID: narinder.gupta@canonical.com-20140904203703-2sk67uwbzk9fc4tk
branch a new version for HP proliant systems where there is no power management required.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 
5
5
#check our internal maas network settings.  Fall back to 10.14.
6
6
 
7
 
if [ -f /etc/hp-moonshot.conf ]; then
8
 
        PREFIX=$(awk -F '[:]' NR==1'{print $3"."$4}' /etc/hp-moonshot.conf)
 
7
if [ -f /etc/hp-proliant.conf ]; then
 
8
        PREFIX=$(awk -F '[:]' NR==1'{print $3"."$4}' /etc/hp-proliant.conf)
9
9
else
10
10
        PREFIX="10.14"
11
11
fi
12
12
 
13
13
preflight_checks() {
14
14
        if [ "$(id -u ubuntu)" != "1000" ]; then
15
 
                echo "ERROR: Read the docs; a proper hp-moonshot setup requires the default user to be [ubuntu]" 1>&2
 
15
                echo "ERROR: Read the docs; a proper hp-proliant setup requires the default user to be [ubuntu]" 1>&2
16
16
                exit 1
17
17
        fi
18
18
        case $(hostname) in
20
20
                        true
21
21
                ;;
22
22
                *)
23
 
                        echo "ERROR: Read the docs; a hp-moonshot setup requires the hostname to be in the form [c*n*]" 1>&2
 
23
                        echo "ERROR: Read the docs; a hp-proliant setup requires the hostname to be in the form [c*n*]" 1>&2
24
24
                        exit 1
25
25
                ;;
26
26
        esac