]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
Drop support for utmpx/wtmpx
authorJan Rękorajski <baggins@pld-linux.org>
Mon, 11 Nov 2013 11:00:52 +0000 (12:00 +0100)
committerJan Rękorajski <baggins@pld-linux.org>
Mon, 11 Nov 2013 11:00:52 +0000 (12:00 +0100)
There was never any difference between regular and "extended" utmp/wtmp
file on linux. Some programs (like last from util-linux 2.24, or systemd)
have no knowledge about them, and keeping those files supported in PLD
is useless pain.

rc.d/init.d/sys-chroots
rc.d/rc.sysinit
sysconfig/system

index 19ba42fe9e0255e8c703569eebaef7cb470426b9..673730043106101fed4a4119b03a06bd085d57b0 100755 (executable)
@@ -77,17 +77,18 @@ start() {
                        /tmp/scrollkeeper-* /tmp/ssh-*
 
                # Clean up utmp/wtmp
-               if ! is_no "$NEED_XFILES" ; then
-                       > /var/run/utmpx
-                       touch /var/log/wtmpx
-                       chown root:utmp /var/run/utmpx /var/log/wtmpx
-                       chmod 0664 /var/run/utmpx /var/log/wtmpx
-               else
-                       > /var/run/utmp
-                       touch /var/log/wtmp
-                       chown root:utmp /var/run/utmp /var/log/wtmp
-                       chmod 0664 /var/run/utmp /var/log/wtmp
+               rm -f /var/run/utmpx
+               > /var/run/utmp
+               if [ -e /var/log/wtmpx ]; then
+                       if [ -e /var/log/wtmp ]; then
+                               rm -f /var/log/wtmpx
+                       else
+                               mv /var/log/wtmpx /var/log/wtmp
+                       fi
                fi
+               touch /var/log/wtmp
+               chown root:utmp /var/run/utmp /var/log/wtmp
+               chmod 0664 /var/run/utmp /var/log/wtmp
                # Clean /tmp
                if is_yes "$CLEAN_TMP"; then
                        rm -rf /tmp/* /tmp/.[a-zA-Z0-9]*
index 82d153fddb0b424373cfb32dbe203b32605c98e7..1b81dce1bba25b5974e607caa538814d4a326fe6 100755 (executable)
@@ -970,17 +970,18 @@ rm -rf /tmp/.X*-unix /tmp/.ICE-unix /tmp/.font-unix /tmp/hsperfdata_* \
 
 {
 # Clean up utmp/wtmp
-if ! is_no "$NEED_XFILES"; then
-       > /var/run/utmpx
-       touch /var/log/wtmpx
-       chown root:utmp /var/run/utmpx /var/log/wtmpx
-       chmod 0664 /var/run/utmpx /var/log/wtmpx
-else
-       > /var/run/utmp
-       touch /var/log/wtmp
-       chown root:utmp /var/run/utmp /var/log/wtmp
-       chmod 0664 /var/run/utmp /var/log/wtmp
+rm -f /var/run/utmpx
+> /var/run/utmp
+if [ -e /var/log/wtmpx ]; then
+       if [ -e /var/log/wtmp ]; then
+               rm -f /var/log/wtmpx
+       else
+               mv /var/log/wtmpx /var/log/wtmp
+       fi
 fi
+touch /var/log/wtmp
+chown root:utmp /var/run/utmp /var/log/wtmp
+chmod 0664 /var/run/utmp /var/log/wtmp
 
 # Clean /tmp
 if is_yes "$CLEAN_TMP" && ! is_fsmounted tmpfs /tmp; then
index 31b5e4f7052b09dda4a29e7c8764a3e597574010..f86eb7369c035914b0b4d8dec132bc7f64e2a876 100644 (file)
@@ -49,9 +49,6 @@ DELAY_LOGIN=yes
 # Clean /tmp at startup ?
 CLEAN_TMP=yes
 
-# We want utmpx/wtmpx
-NEED_XFILES=yes
-
 # Try to setup proper symlinks in /boot (based on kernel version) ?
 SET_SLINKS=yes
 
This page took 0.20298 seconds and 4 git commands to generate.