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@gna.org
>>>> https://mail.gna.org/listinfo/xenomai-core
>>>
>>>
>>
>>
>>
>>
>> _______________________________________________
>> Xenomai-core mailing list
>> Xenomai-core@gna.org
>> https://mail.gna.org/listinfo/xenomai-core
> 
> 
> 
> 
> _______________________________________________
> Xenomai-core mailing list
> Xenomai-core@gna.org
> https://mail.gna.org/listinfo/xenomai-core

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: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core

Reply via email to