Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[OpenRC] rc script fonctionnel pour timidity ?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index French
View previous topic :: View next topic  
Author Message
Dieppe
n00b
n00b


Joined: 14 Jan 2008
Posts: 44
Location: Grenoble, France (38)

PostPosted: Sat May 10, 2008 2:41 am    Post subject: [OpenRC] rc script fonctionnel pour timidity ? Reply with quote

Bonjour,

j'ai un petit problème pour faire fonctionner timidity avec openRC, donc j'ai modifié le fichier suivant (/etc/init.d/timidity) :
Code:
#!/sbin/runscript
 
depend() {
   after alsasound esound
}
 
start() {
   ebegin "Starting TiMidity++ Virtual Midi Sequencer"
   test -n "$TIMIDITY_PCM_NAME" && export TIMIDITY_PCM_NAME
   start-stop-daemon --start --quiet --background --chuid timidity:nobody \
      --make-pidfile --pidfile /var/run/timidity.pid \
      --exec /usr/bin/timidity -- -iA ${TIMIDITY_OPTS}
   eend $?
}
 
stop() {
   ebegin "Stopping TiMidity++"
   start-stop-daemon --stop --quiet --pidfile /var/run/timidity.pid
   eend $?
}


J'ai changé la ligne :

Code:
   start-stop-daemon --start --quiet --background --chuid timidity:nobody \


en :

Code:
   start-stop-daemon --start --quiet --background \


Maintenant ça marche, mais j'aimerais savoir si ça change quelque chose d'important (oui, j'ai un peu fait ça à l'aveuglette...) ?
Back to top
View user's profile Send private message
geekounet
Bodhisattva
Bodhisattva


Joined: 11 Oct 2004
Posts: 3772

PostPosted: Sat May 10, 2008 8:49 am    Post subject: Reply with quote

Et bien maintenant ton timidity++ s'execute en root et t'as donc un trou de sécurité... faire à l'aveuglette c'est jamais conseillé ;)
Remplace plutôt --chuid par --user, ça devrait mieux passer.
Back to top
View user's profile Send private message
Dieppe
n00b
n00b


Joined: 14 Jan 2008
Posts: 44
Location: Grenoble, France (38)

PostPosted: Tue May 13, 2008 12:00 am    Post subject: Reply with quote

Ok merci :)

Quote:
faire à l'aveuglette c'est jamais conseillé


C'est bien pour ça que j'ai demandé :P (ça me semblait bizarre qu'ils aient rajouté cette option pour le plaisir...)

EDIT : Bon, je viens juste de tester, ça marche pas avec --user timidity:nobody, mais ça fonctionne avec --user timidity (sauf que je soupçonne le "nobody" d'avoir aussi un rapport avec la sécurité (ne pas avoir le droit de modifier les fichiers de timidity ?)...)

Au fait, l'erreur renvoyée est celle-ci :

Code:
# /etc/init.d/timidity start
 * Caching service dependencies ...                                       [ ok ]
 * Starting TiMidity++ Virtual Midi Sequencer ...
 * start-stop-daemon: caught an interrupt                                 [ ok ]


Malgré le ok, timidity n'est pas lancé...
Back to top
View user's profile Send private message
geekounet
Bodhisattva
Bodhisattva


Joined: 11 Oct 2004
Posts: 3772

PostPosted: Tue May 13, 2008 5:31 am    Post subject: Reply with quote

Et t'as rien dans les logs ?

Pour le nobody, c'est le groupe du user.
man start-stop-daemon:
     -u, --user user[:group]
             Start the daemon as the user and update $HOME accordingly or stop daemons
             owned by the user. You can optionally append a group name here also.
Back to top
View user's profile Send private message
Dieppe
n00b
n00b


Joined: 14 Jan 2008
Posts: 44
Location: Grenoble, France (38)

PostPosted: Thu May 15, 2008 10:15 pm    Post subject: Reply with quote

Non, rien dans les logs. Enfin, j'ai cherché dans /var/log/, mais il y a peut-être un autre endroit où chercher ?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index French All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum