Skip navigation

在有些Linux发行版上,WiFi指示灯在通信时不停的闪烁。下面给出一种方法停止这种闪烁:

#!/bin/sh

if [ "`id -u`" != "`id -u root`" ]; then
    echo "`whoami`: you need root priviledge to run this application. Invkoing sudo ..."
    exec sudo bash -c "$0 $@"
fi

for trigger in /sys/class/leds/iwl-*X/trigger; do
    echo none > $trigger
    cat $trigger
done

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>