On Mon, 2014-11-03 at 15:38 +0200, Mert Dirik wrote: > On Mon, 03 Nov 2014 02:50:23 +0200 Mert Dirik <mertdi...@gmail.com> wrote: > > > > > I'm attaching a two different versions of the patch. > > > > First version (v1), reads /proc/1/comm to check if it's systemd or init. > > A potential problem with this approach is that the /proc/<pid>/comm > > interface works on only linux 2.6.33+. I don't know if it's really a > > problem. > > > > Second approach reads the output of "systemctl is-system-running" > > command. This command will print "stopping" if systemd is the init and > > the system is shutting down or rebooting. Otherwise (if systemd is not > > init or systemd is not installed at all, so the command doesn't exist) > > it will fail so the if check will fail. > > > > > > systemd maintainers recommend this method to check if systemd is pid 1 > (in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=741930#25): > > > > - systemd > > The canonical check for systemd being PID 1 is > > [ -d /run/systemd/system ] > > See also man 3 sd_booted and [0] > > The patch is attached (untested).
shutdown was working before I uploaded the new version of kexec-tools. I had specifically tested this. Something changed with systemd and now I am seeing the same thing after dist-upgrade. Sigh! I am looking into it. I will check this patch out as well. -- Khalid -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org