Skip to contentSkip to conversation

systemd: create /var/run/utmp

PATCH In review Martin Jansa 3 participants 5 messages May 17, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 systemd: create /var/run/utmp

* it was created by volatiles before, but without sysvinit systemd-update-utmp-runlevel.service fails to start without this

---
 meta-oe/recipes-core/systemd/systemd_git.bb |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
meta-oe/recipes-core/systemd/systemd_git.bb +5 -1
index f4ca72a..943d955 100644
@@ -14,7 +14,7 @@ inherit gitpkgv
 PKGV = "v${GITPKGVTAG}"
 
 PV = "git"
-PR = "r27"
+PR = "r28"
 
 inherit useradd pkgconfig autotools vala perlnative
 
@@ -68,6 +68,10 @@ do_install() {
 	# create machine-id
 	# 20:12 < mezcalero> koen: you have three options: a) run systemd-machine-id-setup at install time, b) have / read-only and an empty file there (for stateless) and c) boot with / writable
 	touch ${D}${sysconfdir}/machine-id
+	
+	# systemd-update-utmp-runlevel.service fails to start without this
+	install -d ${D}${localstatedir}/run
+	touch ${D}${localstatedir}/run/utmp
 }
 
 python populate_packages_prepend (){
Signature · 1 line
1.7.8.6
#1 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 17-05-12 11:23, Martin Jansa schreef:

Quoted 1 line

* it was created by volatiles before,

If it was done by volatiles before shouldn't it be a tmpfile.d/ snippet instead of do_install_append? /var/run gets clean on boot on a lot of systems.

regards,

Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: GPGTools - http://gpgtools.org

iD8DBQFPtMtGMkyGM64RGpERAuSeAJoDjJkjMTgjE5nPQMrVktEOg09V9ACfWWtI qiRbdUTWm265EWCNd+z955Y=
=SMCB
-----END PGP SIGNATURE-----

#2 lore raw
Quoted 8 lines · Koen Kooi

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 17-05-12 11:23, Martin Jansa schreef:

Quoted 1 line

* it was created by volatiles before,

If it was done by volatiles before shouldn't it be a tmpfile.d/ snippet instead of do_install_append? /var/run gets clean on boot on a lot of systems.

Agreed.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
E-mail: [email protected]  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br
#3 lore raw
In reply to Koen Kooi
Quoted 8 lines · Koen Kooi

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 17-05-12 11:23, Martin Jansa schreef:

Quoted 1 line

* it was created by volatiles before,

If it was done by volatiles before shouldn't it be a tmpfile.d/ snippet instead of do_install_append? /var/run gets clean on boot on a lot of systems.

Do you have symlink /var/run -> /run?

Here /var/run is normal directory (without tmpfs mounted there, not cleaned on boot), so it's enough to create it once.

Cheers,

Quoted 18 lines

regards,

Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
Comment: GPGTools - http://gpgtools.org

iD8DBQFPtMtGMkyGM64RGpERAuSeAJoDjJkjMTgjE5nPQMrVktEOg09V9ACfWWtI qiRbdUTWm265EWCNd+z955Y=
=SMCB
-----END PGP SIGNATURE-----

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#4 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 17-05-12 13:04, Martin Jansa schreef:

Quoted 12 lines

On Thu, May 17, 2012 at 11:56:22AM +0200, Koen Kooi wrote: Op 17-05-12 11:23, Martin Jansa schreef:

Quoted 1 line
Quoted 1 line
Quoted 1 line

* it was created by volatiles before,

If it was done by volatiles before shouldn't it be a tmpfile.d/ snippet instead of do_install_append? /var/run gets clean on boot on a lot of systems.

Quoted 4 lines

Do you have symlink /var/run -> /run?

Here /var/run is normal directory (without tmpfs mounted there, not cleaned on boot), so it's enough to create it once

Angstrom uses this:

root@beagleboneA3-0428:~# cat /etc/tmpfiles.d/var-run.conf
# empty /var/run
R	/var/run/*	-	-	-	-	-

Some apps (e.g. avahi-daemon) to clean up their old-style pid files and fail to start every other boot. Se we let systemd clean it on boot.

Something like:

f /var/run/utmp 0644 root root - -

regards,

Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: GPGTools - http://gpgtools.org

iQIcBAEBAgAGBQJPtOwDAAoJEHZqAkdh1vT6XS8P/i1LUiDy+2F+HiP934wdQgBJ X15EPI3Dly+P5BwdGAkJRM/zLgMgqkGQ7tKeJoyGjW4GJq9rN/D1iU1+Vj0VyQFN 3ud2eQAUUsb3HP9pOCitL2tzkGLDOpNJIBAYwMTNVnBmway6T5JFsvRaNpGtBLIr dClrOEmNqN4yZvoHcoMCearVlRuyUqQJo624StktEp4et/h4ekVUvIiOsUqoChgr X/fQn91oLdvHdVcMdH50ylaVGfchkfvLERvHlwRrUM76l+JyDyqmnjjEcLv4b4J7 4NkzVaoCEoe9xQs6Tuo9PLBoksBx7Wp7N0p9MlWoLATvgISk3OoLnv22KMcjN/Vl V11Eti73PyFPoQiC2n9iqKQ91HgwWtjQelQIlbzW7GzyEBvHCHBrfVrNi10CPr6U vC9pJpSLMzvZ2bgOC9jfAFI0INq2Pcdx/pxIOXyEEsBDuESzBxbaqvImPsDpoAob UcNrzLvRF6CvtiWH8ivygpr03htICIK1636K4xRPMkdLzJXzwIjank23to7YJyyK 7IEokBFLJTBTxDY+EY3HBw840VnwhV+veHfPgZsC+orheXBxVeWzGVvKlSNTqYd0 clQe8OAlXXszPyxWaT83QyJAMP76ZCCqpDVad/q7kQO1gApQpAa5uGXsGz54pSe4 jw5N4Hw0T+as1pgWC63+
=WFtW
-----END PGP SIGNATURE-----