View Single Post
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#13
Originally Posted by LozBlake View Post
i tried to do as you said qwerty but i can't get it working, i'm not sure what to try now, i think texas has summed it up nicely, i'll have to run it from root for now.

Is there a way to clear the contents of the powerlevel.sh file from x terminal? i accidentially but the command in the file once wrong.
Odd...

Well, this worked for me:
Code:
#! /bin/sh

VAL=118
FILE=/sys/class/i2c-adapter/i2c-2/2-0063/power_level

if [ $(id -u) = 0 ]; then
	echo $VAL > $FILE
else
	echo "echo $VAL > $FILE" | sudo gainroot
fi

cat $FILE