Module: xenomai-rpm Branch: for-upstream Commit: 45018524099d733a47229f27f4a993845eea1561 URL: http://git.xenomai.org/?p=xenomai-rpm.git;a=commit;h=45018524099d733a47229f27f4a993845eea1561
Author: Stefan Kisdaroczi <ki...@hispeed.ch> Date: Sat Apr 10 12:02:17 2010 +0200 debian: add init-script to package libxenomai1 This patch adds an 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. --- debian/libxenomai1.xenomai.init | 37 +++++++++++++++++++++++++++++++++++++ debian/rules | 1 + 2 files changed, 38 insertions(+), 0 deletions(-) diff --git a/debian/libxenomai1.xenomai.init b/debian/libxenomai1.xenomai.init new file mode 100644 index 0000000..ebb5092 --- /dev/null +++ b/debian/libxenomai1.xenomai.init @@ -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 --git a/debian/rules b/debian/rules index a538800..4cb53a3 100755 --- a/debian/rules +++ b/debian/rules @@ -129,6 +129,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 _______________________________________________ Xenomai-git mailing list Xenomai-git@gna.org https://mail.gna.org/listinfo/xenomai-git