mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-09 16:21:51 +00:00
Repeat available configuration options before prompt (#2289).
The code isn't very clean but that's the best I could come up with. git-svn-id: http://lm-sensors.org/svn/lm-sensors/branches/lm-sensors-3.0.0@5098 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
81a7fbdb22
commit
7963e7cf13
2 files changed
+16
-8
No files matched your search
@@ -10,6 +10,7 @@ SVN
|
||||
pwmconfig: Really hide errors on sysfs writes
|
||||
Deal gracefully with read-only pwm_enable files
|
||||
Warn about outputs found in automatic mode
|
||||
Repeat available configuration options before prompt (#2289)
|
||||
sensord: Fix rrd support (#2276)
|
||||
Use the same colors for daily and weekly charts
|
||||
Drop workaround needed by old versions of rrdtool
|
||||
|
||||
+15
-8
@@ -622,7 +622,11 @@ DEFMAXTEMP=60
|
||||
DEFMINSTART=150
|
||||
DEFMINSTOP=100
|
||||
|
||||
#the section below has a high potential for usability improvements
|
||||
# "select" won't reapeat the list of options, so we enclose it in a
|
||||
# never-ending loop so that it starts over again with each iteration.
|
||||
# I admit it's not exactly nice, but I do not have a better idea to
|
||||
# keep usability at an acceptable level.
|
||||
while [ 1 ] ; do
|
||||
echo
|
||||
echo 'Select fan output to configure, or other action:'
|
||||
select pwms in $pwmactive "Change INTERVAL" "Just quit" "Save and quit" "Show configuration"; do
|
||||
@@ -630,8 +634,9 @@ select pwms in $pwmactive "Change INTERVAL" "Just quit" "Save and quit" "Show co
|
||||
"Change INTERVAL")
|
||||
echo
|
||||
echo "Current interval is $INTERVAL seconds."
|
||||
echo -n "Enter the interval at which fancontrol should update PWM values (in s):"
|
||||
read INTERVAL ;; #check user input here
|
||||
echo -n "Enter the interval at which fancontrol should update PWM values (in s): "
|
||||
read INTERVAL #check user input here
|
||||
break ;;
|
||||
"Just quit")
|
||||
exit ;;
|
||||
"Save and quit")
|
||||
@@ -654,7 +659,8 @@ select pwms in $pwmactive "Change INTERVAL" "Just quit" "Save and quit" "Show co
|
||||
echo " MINPWM=`echo $MINPWM |sed -e \"s/ /\n/g\" |egrep \"${pwmo}\" |sed -e \"s/.*=//g\"`"
|
||||
echo " MAXPWM=`echo $MAXPWM |sed -e \"s/ /\n/g\" |egrep \"${pwmo}\" |sed -e \"s/.*=//g\"`"
|
||||
done
|
||||
echo ;;
|
||||
echo
|
||||
break ;;
|
||||
|
||||
"`echo ${pwmactive} |sed -e 's/ /\n/g' | egrep \"${pwms}\"`" )
|
||||
pwmsed=`echo ${pwms} | sed -e 's/\//\\\\\//g'` #escape / for sed
|
||||
@@ -787,11 +793,12 @@ select pwms in $pwmactive "Change INTERVAL" "Just quit" "Save and quit" "Show co
|
||||
fi
|
||||
echo
|
||||
break;
|
||||
done ;;
|
||||
done
|
||||
break ;;
|
||||
|
||||
*)
|
||||
grep $pwm
|
||||
|
||||
echo "No such option. Enter a number." ;;
|
||||
echo "No such option. Enter a number."
|
||||
break ;;
|
||||
esac
|
||||
done
|
||||
done
|
||||
Reference in new issue
Block a user