X-Git-Url: https://iankelling.org/git/?p=automated-distro-installer;a=blobdiff_plain;f=fai%2Fconfig%2Fclass%2F41-warning.sh;fp=fai%2Fconfig%2Fclass%2F41-warning.sh;h=f66085d52d40cb3a3a1053d3161e257e86827ca2;hp=e9f9ec5b396bffc40147e1fed3ffde799e4dd947;hb=723056c40d38694c14d9bcb6b4a3108f7054a2a1;hpb=94a151efd665eb0214c2c85604b81377fb346de8 diff --git a/fai/config/class/41-warning.sh b/fai/config/class/41-warning.sh index e9f9ec5..f66085d 100755 --- a/fai/config/class/41-warning.sh +++ b/fai/config/class/41-warning.sh @@ -13,11 +13,13 @@ grep -q INSTALL $LOGDIR/FAI_CLASSES || return 0 [ "$flag_menu" ] || return 0 out=$(tty) +# save stdout and redirect stdout to tty +exec 4>&1 > $out red=$(mktemp) echo 'screen_color = (CYAN,RED,ON)' > $red DIALOGRC=$red dialog --colors --clear --aspect 6 --title "FAI - Fully Automatic Installation" --trim \ - --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 + --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 # stop on any error, or if ESC was hit if [ $? -ne 0 ]; then @@ -26,3 +28,4 @@ fi rm $red unset red +exec 1>&4 # restore stdout