mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
move iiab-internet-on|off - introduce netwarn
This commit is contained in:
parent
3e563f858d
commit
52989599dd
3 changed files with 28 additions and 11 deletions
|
@ -202,17 +202,6 @@
|
||||||
# group: root
|
# group: root
|
||||||
mode: 0755
|
mode: 0755
|
||||||
|
|
||||||
- name: Install /usr/bin/iiab-internet-on|off from template (root:root by default)
|
|
||||||
template:
|
|
||||||
src: "{{ item }}"
|
|
||||||
dest: /usr/bin/
|
|
||||||
# owner: root
|
|
||||||
# group: root
|
|
||||||
mode: 0755
|
|
||||||
with_items:
|
|
||||||
- gateway/iiab-internet-on
|
|
||||||
- gateway/iiab-internet-off
|
|
||||||
|
|
||||||
|
|
||||||
- name: Add 'squid' variable values to {{ iiab_ini_file }} - if squid_installed is defined
|
- name: Add 'squid' variable values to {{ iiab_ini_file }} - if squid_installed is defined
|
||||||
ini_file:
|
ini_file:
|
||||||
|
|
|
@ -76,6 +76,26 @@
|
||||||
include_tasks: roles/network/tasks/squid.yml
|
include_tasks: roles/network/tasks/squid.yml
|
||||||
when: squid_install and squid_installed is undefined
|
when: squid_install and squid_installed is undefined
|
||||||
|
|
||||||
|
- name: Link /usr/local/sbin/netwarn to {{ iiab_dir }}/scripts/netwarn
|
||||||
|
file:
|
||||||
|
src: "{{ iiab_dir }}/scripts/netwarn.sh"
|
||||||
|
dest: /usr/local/sbin/netwarn
|
||||||
|
mode: '0755'
|
||||||
|
state: link
|
||||||
|
|
||||||
|
- name: Install /usr/bin/iiab-internet-on|off from template (root:root by default)
|
||||||
|
template:
|
||||||
|
src: "{{ item }}"
|
||||||
|
dest: /usr/bin/
|
||||||
|
# owner: root
|
||||||
|
# group: root
|
||||||
|
mode: 0755
|
||||||
|
with_items:
|
||||||
|
- gateway/iiab-internet-on
|
||||||
|
- gateway/iiab-internet-off
|
||||||
|
|
||||||
|
# mate desktop detection based on 'register: nd_dir'
|
||||||
|
|
||||||
|
|
||||||
- name: "Set 'network_installed: True'"
|
- name: "Set 'network_installed: True'"
|
||||||
set_fact:
|
set_fact:
|
||||||
|
|
8
scripts/netwarn.sh
Normal file
8
scripts/netwarn.sh
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
if ! [ -f /etc/iiab/install-flags/iiab-network-complete ]; then
|
||||||
|
zenity --question --text="You need to provision the network. Ensure you have your upstream internet active first if needed. You will be prompted for your password. You should REBOOT afterwards, do you want to Proceed?"
|
||||||
|
rc=$?
|
||||||
|
if [ $rc == "1" ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
x-terminal-emulator -e /usr/local/bin/iiab-network
|
||||||
|
fi
|
Loading…
Add table
Add a link
Reference in a new issue