Been experimenting and writing more simply scripts and have run into issues that only root can do. I have worked some issues out with sudo but don't think sudo will work for this script.
Need a little help in a simply script I have created. I would like to change the processor speed step but cannot do it as a user. Only root can make the change. What can I do in my script to make it work for a user (really I am the only to make use of it).
Script called Throttle50
Code:
#!/bin/sh
# throttle to 50%
echo -n 4 > /proc/acpi/processor/CPU0/throttling
# copy cpu0 info
cat /proc/acpi/processor/CPU0/info > /storage1/systeminfo/p2
# copy cpu0 throttle speed
cat /proc/acpi/processor/CPU0/throttling > /storage1/systeminfo/p4
# Merge all info into one file
cat /storage1/systeminfo/p* > /storage1/systeminfo/Processorinfo.txt
# Print the output to the screen so as to know script finished correctly
xmessage -center -file /storage1/systeminfo/Processorinfo.txt
Also would like to create simply scripts to stop eth1, change eth1 information (have 6 different wireless sites I visit during a month's time), then restart. I have writing the script to stop and start as user with sudo, but cannot figure out how to rewrite the file:/etc/sysconfig/network-scripts/ifcfg-eth1 as a user but I guess it still needs to remain as root ownership when done. Pretty much the same thing as above
Thanks for your help an time.
Brian1
" Google the Linux way @
http://www.google.com/linux "