Changeset 5098

Show
Ignore:
Timestamp:
01/08/08 20:02:40 (5 years ago)
Author:
khali
Message:

Repeat available configuration options before prompt (#2289).
The code isn't very clean but that's the best I could come up with.

Location:
lm-sensors/branches/lm-sensors-3.0.0
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/branches/lm-sensors-3.0.0/CHANGES

    r5097 r5098  
    1111             Deal gracefully with read-only pwm_enable files 
    1212             Warn about outputs found in automatic mode 
     13             Repeat available configuration options before prompt (#2289) 
    1314  sensord: Fix rrd support (#2276) 
    1415           Use the same colors for daily and weekly charts 
  • lm-sensors/branches/lm-sensors-3.0.0/prog/pwm/pwmconfig

    r5063 r5098  
    623623DEFMINSTOP=100 
    624624 
    625 #the section below has a high potential for usability improvements 
     625# "select" won't reapeat the list of options, so we enclose it in a 
     626# never-ending loop so that it starts over again with each iteration. 
     627# I admit it's not exactly nice, but I do not have a better idea to 
     628# keep usability at an acceptable level. 
     629while [ 1 ] ; do 
    626630echo 
    627631echo 'Select fan output to configure, or other action:' 
     
    631635                echo 
    632636                echo "Current interval is $INTERVAL seconds." 
    633                 echo -n "Enter the interval at which fancontrol should update PWM values (in s):" 
    634                 read INTERVAL ;; #check user input here 
     637                echo -n "Enter the interval at which fancontrol should update PWM values (in s): " 
     638                read INTERVAL #check user input here 
     639                break ;; 
    635640        "Just quit") 
    636641                exit ;; 
     
    655660                        echo "  MAXPWM=`echo $MAXPWM |sed -e \"s/ /\n/g\" |egrep \"${pwmo}\" |sed -e \"s/.*=//g\"`" 
    656661                done 
    657                 echo ;; 
     662                echo 
     663                break ;; 
    658664 
    659665        "`echo ${pwmactive} |sed -e 's/ /\n/g' | egrep \"${pwms}\"`" ) 
     
    788794                        echo 
    789795                        break; 
    790                 done ;; 
     796                done 
     797                break ;; 
    791798         
    792799        *) 
    793                 grep $pwm 
    794  
    795                 echo "No such option. Enter a number." ;; 
     800                echo "No such option. Enter a number." 
     801                break ;; 
    796802        esac 
    797803done 
     804done