As no answer has (yet) been given,
I would like to rewrite differently my
thoughts :
I want to give a simple user the ability the do
something when a block subsystem event happens.

1) with udev it means using libudev and rewriting a udev subset

2) with hal it means "hook"ing a helper in a policy file
according to some <match>
It's system-wide (so only system-wide actions are taken)
but it seems better (that's why ivman|halevt exist[ed])

3) with devicekit-disks it means grabbing information via
a dbus request
-----------------

With 2), there no ability to match properties or to hook
a helper (neither in system.d nor session.d)
(or at least I can't find that in the dbus syntax as it's not
aimed for, nor in any subsystem based over it (like DeviceKit))

But 1) is not design-respectful as, eg, policykit's role
should probably includes to make the user fails smoothlier
than if he just attempt to {mount && rsync,...}.
Moreover here the DeviceKit-disks properties {DeviceIsMounted, ...}
show their potentiel power.
-----------------

But DeviceKit use libudev properties (anyway it enumerates my devices fine)
while DeviceKit-disks doesn't (NULL values).

So I can't dbus-monitor and start working on a program which would listen
to the DeviceKit-disks dbus-service and spawn actions according
to a configuration file
(whose syntax {has_to_be_defined, reuses_hal_s_one, <put your idea here>}

Can someone gives the dbus-send equivalent of
devkit-disks --show /dev/sdaX
as
dbus-send --system --print-reply --dest=org.freedesktop.DeviceKit.Disks \
          --type=method_call                                            \
          /org/freedesktop/DeviceKit/Disks/devices/sda                  \
          org.freedesktop.DBus.Properties.GetAll                        \
          string:'/org/freedesktop/DeviceKit/Disks/devices/sdaX'        \

returns almost nothing (I really want to solve this|my NULL-values issue)

any answer welcomes

Raph
_______________________________________________
devkit-devel mailing list
devkit-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/devkit-devel

Reply via email to