Bug#3095: xbase kills xdm and *then* asks (politely, but , belatedly)
Stephen Early writes ("Bug#3095: xbase kills xdm and *then* asks (politely, but , belatedly)"):
> I know. This is because older versions of xbase kill off xdm and xfs
> unconditionally in their prerm. I can't do anything about this. I suppose
> I could check the version number of the xbase that is being upgraded
> from, but there's no easy way to compare version numbers in package
> scripts at the moment.
There is now - since dpkg 1.2.1 there has been dpkg
If you send stderr and stdout to /dev/null you can tell whether the
option worked and what answer it gave by the exit status: 2 for
failure, 1 for false, 0 for true.
> Alternatively I could look for a running xdm and/or xfs and only prompt
> if they exist. That is probably the better solution. Ways of doing that
start-stop-daemon --test ? This will even give the appropriate exit
status, so you can ignore the output ...