Packaging postinstall handles

2014-08-14 Thread Mathieu Slabbinck
Hi,

I've created a debian installer for an application with some configuration
files.
One of those is a udev rule, installed in /lib/udev/rules.d/xx-rule.rules.
Others are desktop icons and stuff that go into /usr/share/application.
There are two binaries installed, a background process and a main process
that should be launched when the background process notices the correct
device is plugged in.
The background process is placed under /etc/xdg/autostart/ so it launcher
at user login.

Currently, the installer itself works fine, but there are some elements
that I cannot seem to accomplish:
1) automatically reload udev rules after installation.
2) kickstart the background process after installation.

I cannot seem to find any examples that would help me resolve this, so any
help would be greatly appreciated!

Kr,

Mathieu


Re: Packaging postinstall handles

2014-08-14 Thread Josselin Mouette
Le jeudi 14 août 2014 à 15:12 +0200, Mathieu Slabbinck a écrit : 
 The background process is placed under /etc/xdg/autostart/ so it
 launcher at user login.

 1) automatically reload udev rules after installation.

This is automatic. You don’t have anything to do.

 2) kickstart the background process after installation.

A package should never do anything directly to a running session. As for
any rule, there are exceptions such as mechanisms to signal a reload,
but even those are workarounds. You should never launch anything in the
user session. Once your launcher is installed in /etc/xdg/autostart, the
job is done. 
-- 
 .''`.Josselin Mouette
: :' :
`. `'
  `-


-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/1408026561.20025.27.camel@dsp0698014