Hi!

On Fri, 2018-10-12 at 02:12:46 +0200, Michael Biebl wrote:
> Am 12.10.18 um 02:09 schrieb Michael Biebl:
> > Am 11.10.18 um 22:59 schrieb Guillem Jover:
> >> I've switched the socket to be on /tmp so that non-root users can use
> >> it too. I've got some code to generate a tempdir to hold the socket,
> >> but meh, that's ugly. 
> > 
> > Hm, not sure if using /tmp is a good idea.
> > We want to use it in udev, i.e. during early boot where /tmp might not
> > be writable yet. /run sounds like a much better choice for this case.
> 
> See attached screenshot from a VM where /etc/init.d/udev tries to use
> --notify-await

Thanks, I've now improved this to the point I think it should always (!)
work. I'm not happy with hardcoding the /run dir (will probably make
that configurable at build time, was considering making it configurable
at run-time too, but dunno), and I'm still not sure about the default
behavior on timeout, will ponder about those.

Attached the script I'm using to test this, which I run on a chroot with
systemd installed with something like:

  $ utils/start-stop-daemon --notify-timeout 3 --notify-await \
      --background --verbose --no-close --start \
      --exec $(pwd)/notify.sh -- status extend

Or timeout 10 w/ no arguments, etc.

Thanks,
Guillem

Attachment: notify.sh
Description: Bourne shell script

Reply via email to