about summary refs log tree commit diff
path: root/core-services/99-cleanup.sh
diff options
context:
space:
mode:
authorJuan RP <xtraeme@gmail.com>2014-08-28 10:23:51 +0200
committerJuan RP <xtraeme@gmail.com>2014-08-28 10:23:51 +0200
commit30de77763946d45d8d810e7e6d96ff031063826f (patch)
treeab12d685e6f61fed778abd78c4d524712c0e6395 /core-services/99-cleanup.sh
parent745d253c246ccdf63342a4949a0113c5ff49850b (diff)
downloadrunit-void-30de77763946d45d8d810e7e6d96ff031063826f.tar.gz
runit-void-30de77763946d45d8d810e7e6d96ff031063826f.tar.xz
runit-void-30de77763946d45d8d810e7e6d96ff031063826f.zip
core-services/99-cleanup.sh: create /var/log/{b,w}tmp to make last(1) work.
Diffstat (limited to 'core-services/99-cleanup.sh')
-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