-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ralf Mardorf wrote:
> Hi :)
> 
> in a script I want to set a value by "echo 1024 >
> /proc/sys/dev/hpet/max-user-freq".
> This is fine when I manually run "sudo -i", followed by writing the
> value, but not if I try to do it in one line, resp. in a script.
> 
> spinymouse-s...@64studio:~/Desktop$ cat /proc/sys/dev/hpet/max-user-freq
> 64
> spinymouse-s...@64studio:~/Desktop$ sudo echo 1024 >
> /proc/sys/dev/hpet/max-user-freq
> bash: /proc/sys/dev/hpet/max-user-freq: Permission denied
> spinymouse-s...@64studio:~/Desktop$ sudo -i echo 1024 >
> /proc/sys/dev/hpet/max-user-freq
> bash: /proc/sys/dev/hpet/max-user-freq: Permission denied
> spinymouse-s...@64studio:~/Desktop$ sudo -i
> r...@64studio:~# echo 1024 > /proc/sys/dev/hpet/max-user-freq
> r...@64studio:~# logout
> spinymouse-s...@64studio:~/Desktop$ cat /proc/sys/dev/hpet/max-user-freq
> 1024
> 
> Any hints are welcome!
> 
Put the script in root's crontab.  sudo is designed as an interactive
utility.  The script should be run by a user with sufficient privileges
to do what it needs to do.  You can use sudo to run the script, but it
should not be within the script.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAks1qFEACgkQwRXgH3rKGfM1QgCfU6wci5unqGDuopjnna3dJHbc
FTQAniobM2zHMYzE8EMPH8vOtlG9rZ3J
=jkJB
-----END PGP SIGNATURE-----
_______________________________________________
64studio-users mailing list
[email protected]
http://lists.64studio.com/mailman/listinfo/64studio-users

Reply via email to