mirror of
https://github.com/iiab/iiab.git
synced 2025-02-12 11:12:06 +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
|
||||
# running from a git repo
|
||||
PLAYBOOK="iiab-stages.yml"
|
||||
INVENTORY="ansible_hosts"
|
||||
CWD=`pwd`
|
||||
# Add cmdline options for passing to ansible
|
||||
# todo add proper shift to gobble up --debug --reinstall
|
||||
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"
|
||||
|
||||
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
|
||||
mkdir -p /etc/ansible/facts.d
|
||||
fi
|
||||
|
@ -52,9 +67,6 @@ fi
|
|||
|
||||
# if vars/local_vars.yml is missing, put a default one in place - First Run
|
||||
if [ ! -f ./vars/local_vars.yml ]; then
|
||||
OS=`grep ^ID= /etc/*release|cut -d= -f2`
|
||||
OS=${OS//\"/}
|
||||
|
||||
case $OS in
|
||||
OLPC | fedora)
|
||||
cp ./vars/olpc.localvars ./vars/local_vars.yml
|
||||
|
|
Loading…
Reference in a new issue