Re: [LAU] Trying to run jackd from udev

From: Ralf Mardorf <ralf.mardorf@email-addr-hidden-dsl.net>
Date: Sat Mar 23 2013 - 08:48:11 EET

On Sat, 2013-03-23 at 06:49 +0100, Ralf Mardorf wrote:
> On Fri, 2013-03-22 at 23:51 +0100, Jeremy Jongepier wrote:
> > Is this maybe related to using sudo?
>
> I noticed that when checking the user by $USER or $EUID, the result
> often is wrong, but the output of $(id -u) until now always was correct,
> so directly after the sudo I would add
>
> echo $? > id.log
> id -u >> id.log
>
> to the script. The $? to check if sudo is working and id -u to check if
> it really does switch the user, assumed the output of $? should be 0.

Hm?

My idea isn't good.

[root@email-addr-hidden rocketmouse]# /usr/bin/sudo -u rocketmouse -s echo ":)"
:)
[root@email-addr-hidden rocketmouse]# echo $?
0
[root@email-addr-hidden rocketmouse]# id -u
0

Perhaps you should test it by adding an additional sudo

[root@email-addr-hidden rocketmouse]# /usr/bin/sudo -u rocketmouse -s id -u
1000

just to test if it really does work as expected.

_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-user
Received on Sat Mar 23 08:15:04 2013

This archive was generated by hypermail 2.1.8 : Sat Mar 23 2013 - 08:15:04 EET