1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

Merge pull request #757 from holta/fixes-for-ubuntu-18

Fixes for Ubuntu 18.04
This commit is contained in:
A Holt 2018-04-28 12:52:24 -04:00 committed by GitHub
commit 1d903f9c20
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 38 additions and 41 deletions

View file

@ -1,4 +1,14 @@
#!/bin/bash
# upgrades return found, clean installs return 0
# interruptions return last stage number recorded (1-9)
if [ -f /etc/iiab/iiab.env ]; then
source /etc/iiab/iiab.env
STAGE=$STAGE
else
STAGE=0
fi
OS=`grep ^ID= /etc/*elease|cut -d= -f2`
OS=${OS//\"/}
VERSION_ID=`grep VERSION_ID /etc/*elease | cut -d= -f2`
@ -9,62 +19,49 @@ DHCPCD_PATH=`which dhcpcd`
NM_PATH=`which NetworkManager`
case $OS_VER in
"fedora-18" | \
"fedora-22" | \
"debian-8" | \
"debian-9" | \
"ubuntu-16" | \
"ubuntu-17" | \
"ubuntu-18" | \
"centos-7" | \
"raspbian-8"| \
"raspbian-9")
;;
*) OS_VER="OS_not_supported"
"fedora-18" | \
"fedora-22" | \
"debian-8" | \
"debian-9" | \
"ubuntu-16" | \
"ubuntu-17" | \
"ubuntu-18" | \
"centos-7" | \
"raspbian-8"| \
"raspbian-9")
;;
*) OS_VER="OS_not_supported"
;;
esac
# get current version
BRANCH=`git rev-parse --abbrev-ref HEAD`
COMMIT=`git rev-parse --verify HEAD`
if [ -d /usr/lib64/php ]
then
PHPLIB_DIR=/usr/lib64/php
if [ -d /usr/lib64/php ]; then
PHPLIB_DIR=/usr/lib64/php
else
if [ -d /usr/lib/php5 ]; then
PHPLIB_DIR=/usr/lib/php5
else
PHPLIB_DIR=/usr/lib/php
fi
if [ -d /usr/lib/php5 ]; then
PHPLIB_DIR=/usr/lib/php5
else
PHPLIB_DIR=/usr/lib/php
fi
fi
if [ -f /proc/device-tree/mfg-data/MN ]
then
XO_VERSION=`cat /proc/device-tree/mfg-data/MN`
if [ -f /proc/device-tree/mfg-data/MN ]; then
XO_VERSION=`cat /proc/device-tree/mfg-data/MN`
else
XO_VERSION="none"
XO_VERSION="none"
fi
# upgrades return found, clean installs return 0
# interruptions return last stage number recorded (1-9)
if [ -f /etc/iiab/iiab.env ]
then
source /etc/iiab/iiab.env
STAGE=$STAGE
else
STAGE=0
fi
ANSIBLE_VERSION=$(ansible --version|head -n 1|cut -f 2 -d " ")
if [ ! x$DHCPCD_PATH = x ]
then
DHCPCD=`systemctl is-enabled dhcpcd`
if [ ! x$DHCPCD_PATH = x ]; then
DHCPCD=`systemctl is-enabled dhcpcd`
fi
# the check is debian family only is_redhad would use NetworkManager as the
# service name.
if [ ! x$NM_PATH = x ]
then
NM=`systemctl is-enabled network-manager`
if [ ! x$NM_PATH = x ]; then
NM=`systemctl is-enabled network-manager`
fi
SYSD_NETD=`systemctl is-enabled systemd-networkd`

View file

@ -17,6 +17,6 @@ systemctl_program: /bin/systemctl
mysql_service: mysql
apache_log: /var/log/apache2/access.log
sshd_service: ssh
php_version: 7.1
postgresql_version: 9.6
php_version: 7.2
postgresql_version: 10.3
systemd_location: /lib/systemd/system