X-Git-Url: https://iankelling.org/git/?p=automated-distro-installer;a=blobdiff_plain;f=fai%2Fconfig%2Fclass%2F40-parse-profiles.sh;fp=fai%2Fconfig%2Fclass%2F40-parse-profiles.sh;h=cb11c176f45a4c7f5474f41e81777e5ae2af69b3;hp=0fed6ee25c633e0d284ff5459874a11849033948;hb=723056c40d38694c14d9bcb6b4a3108f7054a2a1;hpb=94a151efd665eb0214c2c85604b81377fb346de8 diff --git a/fai/config/class/40-parse-profiles.sh b/fai/config/class/40-parse-profiles.sh index 0fed6ee..cb11c17 100755 --- a/fai/config/class/40-parse-profiles.sh +++ b/fai/config/class/40-parse-profiles.sh @@ -2,7 +2,7 @@ # parse *.profile and build a curses menu, so the user can select a profile # -# (c) 2015 by Thomas Lange, lange@informatik.uni-koeln.de +# (c) 2015 by Thomas Lange, lange@cs.uni-koeln.de # Universitaet zu Koeln if [ X$FAI_ACTION = Xinstall -o X$FAI_ACTION = Xdirinstall -o X$FAI_ACTION = X ]; then @@ -14,6 +14,8 @@ fi [ "$flag_menu" ] || return 0 out=$(tty) +# save stdout and redirect stdout to tty +exec 4>&1 > $out tempfile=$(mktemp) tempfile2=$(mktemp) trap "rm -f $tempfile $tempfile2" EXIT INT QUIT @@ -147,8 +149,7 @@ while true; do dialog --clear --item-help --title "FAI - Fully Automatic Installation" --help-button \ --default-item "$default" \ --menu "\nSelect your FAI profile\n\nThe profile will define a list of classes,\nwhich are used by FAI.\n\n\n"\ - 15 70 0 "${par[@]}" 2> $tempfile 1> $out - + 15 70 0 "${par[@]}" 2> $tempfile _retval=$? case $_retval in 0) @@ -158,8 +159,10 @@ while true; do echo "No profile selected." break ;; 2) - dialog --title "Description of all profiles" --textbox $tempfile2 0 0 1> $out;; + dialog --title "Description of all profiles" --textbox $tempfile2 0 0 ;; esac done unset par ardesc arshort arlong arclasses list tempfile tempfile2 _parsed _retval line + +exec 1>&4 # restore stdout