All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Kisdaroczi <kisda@domain.hid>
To: xenomai@xenomai.org
Subject: Re: [Xenomai-core] Xenomai in Debian
Date: Thu, 25 Feb 2010 18:18:19 +0100	[thread overview]
Message-ID: <4B86B0DB.4000600@domain.hid> (raw)
In-Reply-To: <4B868958.3000503@domain.hid>


[-- Attachment #1.1: Type: text/plain, Size: 2502 bytes --]

Am 25.02.2010 15:29, schrieb Stefan Kisdaroczi:
> Am 25.02.2010 14:59, schrieb Stefan Kisdaroczi:
>> Am 25.02.2010 14:49, schrieb Gilles Chanteperdrix:
>>> Stefan Kisdaroczi wrote:
>>>> Hi,
>>>>
>>>> Am 14.02.2010 10:38, schrieb Philippe Gerum:
>>>>> <snip>
>>>>> In any case, thanks for your work so far. We probably need to discuss
>>>>> the packaging issues on this list, so that we get both consistency and
>>>>> usability in the future.
>>>>>
>>>>> Gilles and Roland, if this is fine with you, I'll handle the liaison
>>>>> role with upstream packagers, so please CC me explicitly on those mails.
>>>>> We'll sort out this issue, it doesn't look that bad anyway.
>>>>
>>>> udev/xenomai.rules sets the group for realtime devices to "xenomai".
>>>> Patch attached to create the group "xenomai" on installation.
>>>>
>>>> Additionally, it would be nice to set "xeno_nucleus.xenomai_gid" to
>>>> group "xenomai" too. Is this possible with a udev rule ?
>>>
>>> Well, no, xeno_nucleus.xenomai_gid is a kernel parameter, so it is boot
>>> loader stuff. However, if xeno_nucleus is compiled as a module, you can
>>> add parameters in /etc/modprobe.d. Well, that would have been the place
>>> to do it some time ago. I may not be completely up-to-date.
>>
>> Hi Gilles,
>>
>> can a init.d script with
>>   echo "<gid>" > /sys/module/xeno_nucleus/parameters/xenomai_gid
>> work in module and builtin case ?
> 
> it seems that init.d will work for the builtin case and modprobe.d for the
> module case. So adding both should work "in all cases" :-)
> I'll give it a try ...

Attached a patch that adds a init-script /etc/init.d/xenomai to the package libxenomai1.
If group xenomai and the file /sys/module/xeno_nucleus/parameters/xenomai_gid are found,
xenomai_gid is set on startup.

Now looking at modprobe.d ...

>>>>
>>>> regards
>>>> kisda
>>>>
>>>>
>>>> ------------------------------------------------------------------------
>>>>
>>>> _______________________________________________
>>>> Xenomai-core mailing list
>>>> Xenomai-core@domain.hid
>>>> https://mail.gna.org/listinfo/xenomai-core
>>>
>>>
>>
>>
>>
>>
>> _______________________________________________
>> Xenomai-core mailing list
>> Xenomai-core@domain.hid
>> https://mail.gna.org/listinfo/xenomai-core
> 
> 
> 
> 
> _______________________________________________
> Xenomai-core mailing list
> Xenomai-core@domain.hid
> https://mail.gna.org/listinfo/xenomai-core


[-- Attachment #1.2: xenomai-init.patch --]
[-- Type: text/plain, Size: 1485 bytes --]

diff -uNrp xenomai-2.5.1/debian/libxenomai1.xenomai.init xenomai-2.5.1.new/debian/libxenomai1.xenomai.init
--- xenomai-2.5.1/debian/libxenomai1.xenomai.init	1970-01-01 01:00:00.000000000 +0100
+++ xenomai-2.5.1.new/debian/libxenomai1.xenomai.init	2010-02-25 17:13:51.000000000 +0100
@@ -0,0 +1,37 @@
+#!/bin/sh -e
+### BEGIN INIT INFO
+# Provides:          xenomai
+# Required-Start:    mountkernfs
+# Required-Stop:
+# Default-Start:     S
+# Default-Stop:
+# Short-Description: Set xeno_nucleus group
+### END INIT INFO
+
+GROUP=xenomai
+INITNAME=/etc/init.d/xenomai
+FILENAME=/sys/module/xeno_nucleus/parameters/xenomai_gid
+GID=$(getent group $GROUP | cut -d: -f3)
+
+test -e $FILENAME || exit 0
+test -n "$GID" || exit 0
+
+case "$1" in
+  start)
+        echo "$GID" > $FILENAME
+        ;;
+  stop)
+        echo "-1" > $FILENAME
+        ;;
+  restart|force-reload)
+        $0 stop
+        $0 start
+        ;;
+  *)
+        echo "Usage: $INITNAME {start|stop|restart|force-reload}"
+        exit 1
+        ;;
+esac
+
+exit 0
+
diff -uNrp xenomai-2.5.1/debian/rules xenomai-2.5.1.new/debian/rules
--- xenomai-2.5.1/debian/rules	2010-02-25 16:56:05.000000000 +0100
+++ xenomai-2.5.1.new/debian/rules	2010-02-25 17:33:20.000000000 +0100
@@ -132,6 +132,7 @@ binary-indep: build install
 binary-arch: build install
 	dh_testdir -s
 	dh_testroot -s
+	dh_installinit -s --name=xenomai
 	dh_installman -s
 	dh_installdocs -s -A CREDITS README.INSTALL TROUBLESHOOTING
 	dh_link -s

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 251 bytes --]

  reply	other threads:[~2010-02-25 17:18 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-07  9:01 [Xenomai-core] Xenomai in Debian Roland Stigge
2010-02-07 14:24 ` Gilles Chanteperdrix
2010-02-13 14:32 ` Gilles Chanteperdrix
2010-02-13 15:07   ` Roland Stigge
2010-02-13 15:25     ` Gilles Chanteperdrix
2010-02-13 18:30       ` Jan Kiszka
2010-02-13 18:37         ` Gilles Chanteperdrix
2010-02-13 18:48           ` Jan Kiszka
2010-02-13 21:15             ` Gilles Chanteperdrix
2010-02-14  9:38     ` Philippe Gerum
2010-02-23 16:52       ` Stefan Kisdaroczi
2010-02-23 17:46         ` Philippe Gerum
2010-02-24 13:06           ` Stefan Kisdaroczi
2010-02-24 13:11             ` Philippe Gerum
2010-02-24 13:13               ` Philippe Gerum
2010-02-26 13:13                 ` Stefan Kisdaroczi
2010-02-26 13:28                   ` Philippe Gerum
2010-02-26 13:48                     ` Stefan Kisdaroczi
2010-02-26 14:07                       ` Philippe Gerum
2010-03-03 16:54                         ` Stefan Kisdaroczi
2010-03-03 17:21                           ` Philippe Gerum
2010-02-25 12:46             ` Stefan Kisdaroczi
2010-02-25 13:44       ` Stefan Kisdaroczi
2010-02-25 13:49         ` Gilles Chanteperdrix
2010-02-25 13:59           ` Stefan Kisdaroczi
2010-02-25 14:29             ` Stefan Kisdaroczi
2010-02-25 17:18               ` Stefan Kisdaroczi [this message]
2010-02-26 13:35                 ` Stefan Kisdaroczi
2010-05-02 16:01                   ` Roland Stigge
     [not found]             ` <4B868CC1.6030103@domain.hid>
2010-02-25 18:31               ` Stefan Kisdaroczi
2010-02-25 13:59           ` Jan Kiszka
2010-03-01 17:04     ` Gilles Chanteperdrix
2010-03-01 21:45       ` Roland Stigge
  -- strict thread matches above, loose matches on Subject: below --
2008-02-26  8:25 Roland Stigge
2008-02-26 10:26 ` Gilles Chanteperdrix
2008-02-26 10:43   ` Roland Stigge
2008-02-26 13:20     ` Gilles Chanteperdrix
2008-02-26 15:32       ` Roland Stigge

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B86B0DB.4000600@domain.hid \
    --to=kisda@domain.hid \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.