[Pkg-utopia-maintainers] Bug#593195: Bug#593195: udisks detect chrooted patch for debian package.

Michael Biebl biebl at debian.org
Mon Aug 30 11:10:01 UTC 2010


On 30.08.2010 12:14, Michael Biebl wrote:
> Another idea, I'd prefer over your proposed patch, is to test if the D-Bus names
> for org.freedesktop.UDisks resp. org.freedesktop.UPower are taken (which should
> not be the case in a chroot) and skip the restart if not.

So, s-s-d --exec *without* --pidfile is a bit unsafe, as according to the man
page it will kill *all* processes matching /proc/pid/exe (see also guillem's
comments in #593201)

Going further with the dbus idea, we could use something like this

if [ -f /var/run/dbus/system_bus_socket ] ; then
  pid=$(dbus-send --system --dest=org.freedesktop.DBus --print-reply \
   /org/freedesktop/DBus org.freedesktop.DBus.GetConnectionUnixProcessID \
   string:'org.freedesktop.UDisks' 2>/dev/null | grep uint32 | awk '{print $2}')

  [ -n "$pid" ] && kill $pid / restart etc.
fi

Does anyone see any obvious downsides with this approach or thinks this is not a
good idea?

Michael



-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-utopia-maintainers/attachments/20100830/027c4600/attachment-0001.pgp>


More information about the Pkg-utopia-maintainers mailing list