sysvinit/sysvinit-2.88+dsf-run.diff
2011-06-01 15:13:38 +00:00

24 lines
579 B
Diff

use /run/utmp
Index: src/paths.h
===================================================================
--- src/paths.h.orig
+++ src/paths.h
@@ -48,3 +48,5 @@
#define REBOOTSCRIPT2 "/etc/rc.d/rc.6" /* Ditto. */
#endif
+#undef UTMP_FILE
+#define UTMP_FILE "/run/utmp"
Index: src/init.c
===================================================================
--- src/init.c.orig
+++ src/init.c
@@ -2634,6 +2634,7 @@ void init_main(void)
*/
if ((fd = open(UTMP_FILE, O_WRONLY|O_CREAT|O_TRUNC, 0644)) >= 0)
close(fd);
+ utmpname(UTMP_FILE);
/*
* Say hello to the world