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-sudo@64studio:~/Desktop$ cat /proc/sys/dev/hpet/max-user-freq
64
spinymouse-sudo@64studio:~/Desktop$ sudo echo 1024 >
/proc/sys/dev/hpet/max-user-freq
bash: /proc/sys/dev/hpet/max-user-freq: Permission denied
spinymouse-sudo@64studio:~/Desktop$ sudo -i echo 1024 >
/proc/sys/dev/hpet/max-user-freq
bash: /proc/sys/dev/hpet/max-user-freq: Permission denied
spinymouse-sudo@64studio:~/Desktop$ sudo -i
root@64studio:~# echo 1024 > /proc/sys/dev/hpet/max-user-freq
root@64studio:~# logout
spinymouse-sudo@64studio:~/Desktop$ cat /proc/sys/dev/hpet/max-user-freq
1024
Any hints are welcome!
Cheers,
Ralf
#!/bin/sh
# As user run this script by: sh start-session
song_version="[snip]"
hpet_max_user_freq=1024
song_info="
################################################## ####################
# Project/ song: /mnt/music/[snip]/"$song_version"
# Dec/26/2009 Ralf Mardorf
# ralf.mardorf at alice-dsl dot net
#
# License for all artwork in the folder /[snip]:
# Creative Commons
# by-nc-sa = Attribution-NonCommercial- ShareAlike
# http://creativecommons.org/licenses/by-nc-sa/3.0/
# Namensnennung-NichtKommerziell-Weitergabe unter gleichen Bedingungen
# http://creativecommons.org/licenses/by-nc-sa/3.0/de/
################################################## ####################
"
if [ $USER = "root" ] ; then echo "
Only a user is allowed to run this script

" ; exit 0 ; fi
echo "
Restoring session

"
echo $song_info
sudo chgrp audio /dev/hpet
echo "/etc/sysctl.conf"
echo -n "dev.hpet.max-user-freq Value="
cat /etc/sysctl.conf | grep dev.hpet.max-user-freq=
echo "
"
echo -n "/proc/sys/dev/hpet/max-user-freq Value="
cat /proc/sys/dev/hpet/max-user-freq
echo "
Make sure that the value is set to "$hpet_max_user_freq
sudo echo $hpet_max_user_freq >/proc/sys/dev/hpet/max-user-freq
echo
echo -n "/proc/sys/dev/hpet/max-user-freq Value="
cat /proc/sys/dev/hpet/max-user-freq
sudo modprobe snd-hrtimer
echo "
jackd -Rch -dalsa -dhw:0 -r96000 -p512 -n2 -Xseq"
jackd -Rch -dalsa -dhw:0 -r96000 -p512 -n2 -Xseq &
qtractor
exit 0
_______________________________________________
64studio-users mailing list
64studio-users@lists.64studio.com
http://lists.64studio.com/mailman/listinfo/64studio-users