scripts-reco

Des scripts pour faciliter le reconditionnement de portables - retour accueil

git clone git://bebou.netlib.re/scripts-reco

Log | Files | Refs | README |

leds (487B)


      1 # LED
      2 path=/sys/class/leds
      3 
      4 for led in input0::capslock hp::hddprotect white::kbd_backlight;do
      5 	[ ! -L $path/$led ] && continue
      6 	pause "La led $led va clignoter"
      7 	max=$(cat $path/$led/max_brightness)
      8 	cur=$(cat $path/$led/brightness)
      9 	for i in seq 10;do
     10 		sudo sh -c 'printf "$1" > $2/$3/brightness' -- "$max" "$path" "$led"
     11 		sleep 0.1
     12 		sudo sh -c 'printf "$1" > $2/$3/brightness' -- "0" "$path" "$led"
     13 	done
     14 	sudo sh -c 'printf "$1" > $2/$3/brightness' -- "$cur" "$path" "$led"
     15 done
     16