summaryrefslogtreecommitdiffstats
path: root/jjb/compass4nfv
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2017-04-23 21:06:39 -0400
committerTim Rozet <trozet@redhat.com>2017-04-23 21:06:39 -0400
commitdae7719231115b7169a4e0feb02bde194ca8252a (patch)
tree2ee880f3180ef4eb7f72cae62d766aecf893fdc3 /jjb/compass4nfv
parentc9b1f1194dbe6c050010fcc9e3188835f35a83ea (diff)
Apex: fixes iso verify/upload
Change-Id: I25baff8b74bf26903e5196f31b9f47dab94fd048 Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'jjb/compass4nfv')
0 files changed, 0 insertions, 0 deletions
lor: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#!/bin/bash

##############################################################################
# Copyright (c) 2016 ZTE Coreporation and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################

set -x

echo "r00tme" | passwd --stdin root

sed -i 's/^SELINUX=enforcing/SELINUX=permissive/g' /etc/selinux/config

sed -i 's/#PermitRootLogin yes/PermitRootLogin yes/g' /etc/ssh/sshd_config
sed -i 's/#UseDNS yes/UseDNS no/g' /etc/ssh/sshd_config

if [ -z $ipaddr ] || [ -z $gwaddr ]; then
    cat << EOF > /etc/sysconfig/network-scripts/ifcfg-ens3
DEVICE="ens3"
BOOTPROTO="dhcp"
ONBOOT="yes"
TYPE="Ethernet"
USERCTL="yes"
PEERDNS="yes"
IPV6INIT="no"
PERSISTENT_DHCLIENT="1"
EOF

    cat << EOF > /etc/resolv.conf
nameserver 8.8.8.8
EOF

else
    cat << EOF > /etc/sysconfig/network-scripts/ifcfg-ens3
DEVICE="ens3"
NAME="ens3"
BOOTPROTO="static"
ONBOOT="yes"
TYPE="Ethernet"
IPADDR="${ipaddr}"
NETMASK="255.255.255.0"
GATEWAY="${gwaddr}"
IPV6INIT="no"
EOF

    cat << EOF > /etc/resolv.conf
nameserver ${gwaddr}
nameserver 8.8.8.8
EOF

fi

host_name=daisy
echo ${host_name} > /etc/hostname
sed -i "/^127.0.0.1/s/ localhost / ${host_name} localhost /g" /etc/hosts

# required by daisycloud-core daisy/api/backends/osinstall/pxe/install.py
# This can be removed when upstream fix it.
mkdir -p -m 700 /root/.ssh
touch /root/.ssh/known_hosts
chmod 600 /root/.ssh/known_hosts

# Allow console access via pwd
cat << EOF > /etc/cloud/cloud.cfg.d/default.cfg
disable_root: False
ssh_pwauth: True
EOF

cd /etc
if [ ! -z $localtime_file ] && [ -f $localtime_file ]; then
    ln -s -f $localtime_file /etc/localtime
fi