Merge "rax-nova-agent: switch to $DISTRO_NAME"
This commit is contained in:
commit
c0b02f4623
@ -21,19 +21,16 @@ fi
|
||||
set -eu
|
||||
set -o pipefail
|
||||
|
||||
DIST=$(lsb_release -is)
|
||||
[ -n "$DIST" ]
|
||||
|
||||
XS_TOOLS_DIR=$(mktemp -d)
|
||||
mount -o loop /tmp/xs-tools.iso $XS_TOOLS_DIR
|
||||
pushd $XS_TOOLS_DIR/Linux
|
||||
case $DIST in
|
||||
'Ubuntu'|'Debian')
|
||||
case "$DISTRO_NAME" in
|
||||
'ubuntu'|'debian')
|
||||
# Seriously
|
||||
source versions.deb
|
||||
dpkg -i $XE_GUEST_UTILITIES_PKG_FILE_amd64
|
||||
;;
|
||||
'Fedora'|'CentOS' | 'openSUSE project')
|
||||
'fedora'|'centos'|'centos7'|'opensuse')
|
||||
source versions.rpm
|
||||
rpm -Uvh $XE_GUEST_UTILITIES_PKG_FILE_x86_64
|
||||
;;
|
||||
|
@ -32,10 +32,8 @@ runcmd:
|
||||
- ip addr show eth0 | grep inet || ( ifdown -a ; ifup -a )
|
||||
EOF
|
||||
|
||||
DIST=$(lsb_release -is)
|
||||
[ -n "$DIST" ]
|
||||
case $DIST in
|
||||
'Ubuntu'|'Debian')
|
||||
case "$DISTRO_NAME" in
|
||||
'ubuntu'|'debian')
|
||||
|
||||
# cloud-init / nova-agent sad panda hacks
|
||||
cat > /etc/init/nova-agent.conf <<'EOF'
|
||||
@ -87,7 +85,7 @@ respawn
|
||||
exec /sbin/getty -L 115200 hvc0 vt102
|
||||
EOF
|
||||
;;
|
||||
'Fedora'|'CentOS' | 'openSUSE project')
|
||||
'fedora'|'centos'|'centos7'|'opensuse')
|
||||
|
||||
cat > /usr/local/bin/run-nova-agent.sh <<'EOF'
|
||||
#!/bin/bash
|
||||
|
Loading…
Reference in New Issue
Block a user