mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
raspbian kernel check
This commit is contained in:
parent
a9926e6700
commit
c8950389e8
1 changed files with 18 additions and 6 deletions
24
iiab-install
24
iiab-install
|
@ -1,14 +1,29 @@
|
||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
# running from a git repo
|
# running from a git repo
|
||||||
PLAYBOOK="iiab-stages.yml"
|
|
||||||
INVENTORY="ansible_hosts"
|
|
||||||
CWD=`pwd`
|
|
||||||
# Add cmdline options for passing to ansible
|
# Add cmdline options for passing to ansible
|
||||||
# todo add proper shift to gobble up --debug --reinstall
|
# todo add proper shift to gobble up --debug --reinstall
|
||||||
ARGS=""
|
ARGS=""
|
||||||
|
|
||||||
|
PLAYBOOK="iiab-stages.yml"
|
||||||
|
INVENTORY="ansible_hosts"
|
||||||
|
CWD=`pwd`
|
||||||
|
OS=`grep ^ID= /etc/*release|cut -d= -f2`
|
||||||
|
OS=${OS//\"/}
|
||||||
|
|
||||||
export ANSIBLE_LOG_PATH="$CWD/iiab-install.log"
|
export ANSIBLE_LOG_PATH="$CWD/iiab-install.log"
|
||||||
|
|
||||||
|
if [ $OS = "raspbian" ]; then
|
||||||
|
echo "found"
|
||||||
|
REBOOT=`uname -a | grep 4.9.59-v7+ | wc -l`
|
||||||
|
if [ $REBOOT != 1 ]; then
|
||||||
|
echo "Please update your system with 'add inst' "
|
||||||
|
echo "and reboot to install latest kernel"
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "latest kernel installed - continuing"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -f /etc/ansible/facts.d/local_facts.fact ]; then
|
if [ ! -f /etc/ansible/facts.d/local_facts.fact ]; then
|
||||||
mkdir -p /etc/ansible/facts.d
|
mkdir -p /etc/ansible/facts.d
|
||||||
fi
|
fi
|
||||||
|
@ -52,9 +67,6 @@ fi
|
||||||
|
|
||||||
# if vars/local_vars.yml is missing, put a default one in place - First Run
|
# if vars/local_vars.yml is missing, put a default one in place - First Run
|
||||||
if [ ! -f ./vars/local_vars.yml ]; then
|
if [ ! -f ./vars/local_vars.yml ]; then
|
||||||
OS=`grep ^ID= /etc/*release|cut -d= -f2`
|
|
||||||
OS=${OS//\"/}
|
|
||||||
|
|
||||||
case $OS in
|
case $OS in
|
||||||
OLPC | fedora)
|
OLPC | fedora)
|
||||||
cp ./vars/olpc.localvars ./vars/local_vars.yml
|
cp ./vars/olpc.localvars ./vars/local_vars.yml
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue