summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--core-services/99-cleanup.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/core-services/99-cleanup.sh b/core-services/99-cleanup.sh
index fff258f..4ede9c1 100644
--- a/core-services/99-cleanup.sh
+++ b/core-services/99-cleanup.sh
@@ -1,5 +1,11 @@
 #!/bin/sh
 
-install -m0664 -o root -g utmp /dev/null /run/utmp
+install -m0644 -o root -g utmp /dev/null /run/utmp
+if [ ! -e /var/log/wtmp ]; then
+	install -m0664 -o root -g utmp /dev/null /var/log/wtmp
+fi
+if [ ! -e /var/log/btmp ]; then
+	install -m0664 -o root -g utmp /dev/null /var/log/btmp
+fi
 install -dm1777 /tmp/.X11-unix /tmp/.ICE-unix
 rm -f /etc/nologin /forcefsck /forcequotacheck /fastboot