upstream 00f2ea2b8 as of 2018-09-02
[automated-distro-installer] / fai / config / class / 41-warning.sh
1 #! /bin/bash
2
3 if [ X$FAI_ACTION = Xinstall -o X$FAI_ACTION = X ]; then
4 :
5 else
6 return 0
7 fi
8 if [ X$action = Xdirinstall ]; then
9 return 0
10 fi
11
12 grep -q INSTALL $LOGDIR/FAI_CLASSES || return 0
13 [ "$flag_menu" ] || return 0
14
15 out=$(tty)
16 red=$(mktemp)
17 echo 'screen_color = (CYAN,RED,ON)' > $red
18
19 DIALOGRC=$red dialog --colors --clear --aspect 6 --title "FAI - Fully Automatic Installation" --trim \
20 --msgbox "\n\n If you continue, \n all your data on the disk \n \n|\Zr\Z1 WILL BE DESTROYED \Z0\Zn|\n\n" 0 0 1>$out
21
22 # stop on any error, or if ESC was hit
23 if [ $? -ne 0 ]; then
24 task_error 999
25 fi
26
27 rm $red
28 unset red