These should be easy;
#1) What is the function of -f in a script? Example: [ -f $AVAILABLE ] || exit 0
#2) Does the case statement below pick the first answer in the list and then exit?
This is a snippet from /etc/init.d/ondemand. i believe what this does it cycle through the list of available governors until it finds one then uses it. On my system, "interactive" isn't available so "ondemand" get used. "powersave" is also available but the above statement uses "ondemand" because it's ahead of "powersave". If I rearranged the order of the stanzas (putting powersave above ondemand) then it would set powersave rather than ondemand. Is this right?
#1) What is the function of -f in a script? Example: [ -f $AVAILABLE ] || exit 0
#2) Does the case statement below pick the first answer in the list and then exit?
Code:
case $governors in *interactive*) GOVERNOR="interactive" break ;; *ondemand*) GOVERNOR="ondemand" case $(uname -m) in ppc64*) SAMPLING=100 ;; esac break ;; *powersave*) GOVERNOR="powersave" break ;; *) exit 0 ;; esac
Comment