Gentoo Archives: gentoo-dev

From: Maxim Kammerer <mk@×××.su>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Stability of /sys api
Date: Tue, 15 May 2012 01:57:45
Message-Id: CAHsXYDCzL=zHqa8Narc4MsXnW_pmGpOSbsgbSkY7c_AWo8oSOw@mail.gmail.com
In Reply to: Re: [gentoo-dev] Stability of /sys api by Greg KH
On Tue, May 15, 2012 at 4:23 AM, Greg KH <gregkh@g.o> wrote:
> We learned that this is not a good idea at all, and should be left to userspace helper applications > that listen for dbus messages.
Could you perhaps expand a bit on those reasons? E.g., I had good experience with the following short script for coupling udev events with autofs: https://github.com/mkdesu/liberte/blob/master/src/usr/local/sbin/ps-mount. Gentoo wiki has a similar tutorial as well. Granted, it is a single-user setup, but I can imagine it being extended to work with ConsoleKit. One obvious problem is mounting encrypted volumes. I thought about moving to e.g., udisks-glue (as a more standard solution), but from what I hear there are too many bugs with udisks at the moment.
> Actually with all the hype about mdev these days, why not just use a 3 > year old version of udev (or maybe 4), that is probably what mdev is at > as far as functionality goes.
I don't know at what state udev was 3 or 4 years ago, but mdev can: 1. Populate /dev (now unnecessary due to devtmpfs). 2. Handle ownership, permissions and symlinks to /dev nodes once they appear, according to simple rules (can be probably done with inotify). 3. Act as /sbin/hotplug, typically doing something equivalent to this one-liner: [ "${ACTION}" = add -a -n "${MODALIAS}" ] && modprobe -qb "${MODALIAS}" I don't think mdev can do anything else. Building any serious framework on top of mdev seems pointless to me, since it will probably end up as a small subset of udev core reimplemented with scripts. -- Maxim Kammerer Liberté Linux (discussion / support: http://dee.su/liberte-contribute)

Replies

Subject Author
Re: [gentoo-dev] Stability of /sys api Greg KH <gregkh@g.o>
Re: [gentoo-dev] Stability of /sys api Walter Dnes <waltdnes@××××××××.org>