mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Ifnames (#160)
* move reboot early in install process for rpi9 only * sed regular expression, add space above message * has awk but not gawk * add in download of wifi driver - raspbian-9
This commit is contained in:
parent
cac882a7ef
commit
ee4df858b3
2 changed files with 26 additions and 2 deletions
|
@ -41,7 +41,7 @@
|
|||
dest=/etc/dphys-swapfile
|
||||
when: is_debuntu
|
||||
|
||||
- name: restart the swqp service
|
||||
- name: restart the swap service
|
||||
command: /etc/init.d/dphys-swapfile restart
|
||||
when: is_debuntu
|
||||
|
||||
|
@ -58,3 +58,12 @@
|
|||
- name: Enable rootfs resizing service
|
||||
service: name=iiab-rpi-root-resize
|
||||
enabled=yes
|
||||
|
||||
- name: substitute jessie wifi driver on raspbian-9 workaround
|
||||
get_url: url={{ iiab_download_url }}/{{ item }}
|
||||
dest=/lib/firmware/brcm/
|
||||
force=yes
|
||||
with_items:
|
||||
- brcmfmac43430-sdio.bin
|
||||
- brcmfmac43430-sdio.txt
|
||||
when: ansible_local.local_facts.os_ver == "raspbian-9"
|
||||
|
|
17
runansible
17
runansible
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/bin/bash
|
||||
|
||||
# copy var files to /etc/iiab for subsequent use
|
||||
mkdir -p /etc/iiab
|
||||
|
@ -58,6 +58,21 @@ if [ ! -f /etc/ansible/facts.d/local_facts.fact ]; then
|
|||
fi
|
||||
cp ./scripts/local_facts.fact /etc/ansible/facts.d/local_facts.fact
|
||||
|
||||
# raspbian-9 changes network interface names to include mac address
|
||||
# which defeats copying an image from one SD card to another
|
||||
raspbian_ver=`./scripts/local_facts.fact|grep os_ver|awk -F '"' '{print $4}'`
|
||||
if [ "$raspbian_ver" == "raspbian-9" ]; then
|
||||
grep net.ifnames=0 /boot/cmdline.txt
|
||||
if [ $? -ne 0 ]; then
|
||||
sed -i -r 's/deadline +fsck/deadline net.ifnames=0 fsck/' /boot/cmdline.txt
|
||||
echo
|
||||
echo "Kernel cmdline changed. Will now reboot so that network interface names will"
|
||||
echo " be same for all raspberry pi\'s. Hit enter, and then restart this script"
|
||||
read var
|
||||
reboot
|
||||
fi
|
||||
fi
|
||||
|
||||
PLAYBOOK="iiab.yml"
|
||||
INVENTORY="ansible_hosts"
|
||||
CWD=`pwd`
|
||||
|
|
Loading…
Add table
Reference in a new issue