[systemd-devel] systemd-update-utmp fails
Michael Olbrich
m.olbrich at pengutronix.de
Fri May 13 06:28:37 PDT 2011
On Fri, May 13, 2011 at 03:15:43PM +0200, Kay Sievers wrote:
> On Fri, May 13, 2011 at 14:46, Michael Olbrich <m.olbrich at pengutronix.de> wrote:
> > On Fri, May 13, 2011 at 01:42:55PM +0200, Kay Sievers wrote:
> >> On Fri, May 13, 2011 at 11:53, Michael Olbrich <m.olbrich at pengutronix.de> wrote:
> >> > systemd-update-utmp fails here like this:
> >> >
> >> > systemd-update-utmp[413]: Failed to write utmp record: No such file or directory
> >> >
> >> > I'm not sure why. /var/run/ is writable but for some reason /var/run/utmp
> >> > is not created. If I touch /var/run/utmp before running systemd-update-utmp
> >> > it works and /var/run/utmp is updated.
> >> > I don't really know how this stuff works. Where is /var/run/utmp supposed
> >> > to be created?
> >>
> >> # grep utmp /usr/lib/tmpfiles.d/systemd.conf
> >> F /run/utmp 0664 root utmp -
> >> f /var/log/wtmp 0664 root utmp -
> >> f /var/log/btmp 0600 root utmp -
> >
> > Ah, I see. I have an old tmpfs entry for /var/run in my fstab. After
> > removing that, it works as expected. Thanks.
>
> Ah, great! You should probably make the stuff in /var just links to
> /run. Systemd will handle that fine.
Arg, unfortunately that wasn't the problem. I'm not sure now, why it
worked. The real issue is that systemd-tmpfiles-setup.service has:
ConditionPathExists=/etc/tmpfiles.d
I don't have /etc/tmpfiles.d, only /usr/lib/tmpfiles.d, so it's skipped.
I think this should be:
ConditionPathExists=|/etc/tmpfiles.d
ConditionPathExists=|/run/tmpfiles.d
ConditionPathExists=|/usr/lib/tmpfiles.d
or something like that.
Regards,
Michael
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
More information about the systemd-devel
mailing list