diff --git a/etc/periodic/monthly/Makefile b/etc/periodic/monthly/Makefile index b7f0ecd7e546..77c1d663dbc6 100644 --- a/etc/periodic/monthly/Makefile +++ b/etc/periodic/monthly/Makefile @@ -2,7 +2,12 @@ .include -FILES= 200.accounting \ - 999.local +FILES= 999.local + +# NB: keep these sorted by MK_* knobs + +.if ${MK_UTMPX} != "no" +FILES+= 200.accounting +.endif .include diff --git a/share/mk/bsd.own.mk b/share/mk/bsd.own.mk index f7ab5f8703ec..a589fba8fbcb 100644 --- a/share/mk/bsd.own.mk +++ b/share/mk/bsd.own.mk @@ -383,6 +383,7 @@ __DEFAULT_YES_OPTIONS = \ TEXTPROC \ TOOLCHAIN \ USB \ + UTMPX \ WIRELESS \ WPA_SUPPLICANT_EAPOL \ ZFS \ diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 941a28fcde8c..3de090d5ac63 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -3326,6 +3326,24 @@ OLD_FILES+=usr/share/man/man8/telnetd.8.gz # to be filled in #.endif +.if ${MK_UTMPX} == no +OLD_FILES+=etc/periodic/monthly/200.accounting +OLD_FILES+=usr/bin/last +OLD_FILES+=usr/bin/users +OLD_FILES+=usr/bin/who +OLD_FILES+=usr/bin/wtmpcvt +OLD_FILES+=usr/sbin/ac +OLD_FILES+=usr/sbin/lastlogin +OLD_FILES+=usr/sbin/utxrm +OLD_FILES+=usr/share/man/man1/last.1.gz +OLD_FILES+=usr/share/man/man1/users.1.gz +OLD_FILES+=usr/share/man/man1/who.1.gz +OLD_FILES+=usr/share/man/man1/wtmpcvt.1.gz +OLD_FILES+=usr/share/man/man8/ac.8.gz +OLD_FILES+=usr/share/man/man8/lastlogin.8.gz +OLD_FILES+=usr/share/man/man8/utxrm.8.gz +.endif + .if ${MK_WIRELESS} == no OLD_FILES+=etc/regdomain.xml OLD_FILES+=usr/sbin/ancontrol diff --git a/tools/build/options/WITHOUT_UTMPX b/tools/build/options/WITHOUT_UTMPX new file mode 100644 index 000000000000..205ca5c0a48d --- /dev/null +++ b/tools/build/options/WITHOUT_UTMPX @@ -0,0 +1,10 @@ +.\" $FreeBSD$ +Set to not build user accounting tools such as +.Xr last 1 , +.Xr users 1 , +.Xr who 1 , +.Xr wtmpcvt 1 , +.Xr ac 8 , +.Xr lastlogin 8 +and +.Xr utxrm 8 . diff --git a/usr.bin/Makefile b/usr.bin/Makefile index f258347ef7d8..87e8cad687c5 100644 --- a/usr.bin/Makefile +++ b/usr.bin/Makefile @@ -74,7 +74,6 @@ SUBDIR= alias \ ktrace \ ktrdump \ lam \ - last \ lastcomm \ ldd \ leave \ @@ -170,7 +169,6 @@ SUBDIR= alias \ unzip \ units \ unvis \ - users \ uudecode \ uuencode \ vi \ @@ -182,10 +180,8 @@ SUBDIR= alias \ what \ whereis \ which \ - who \ whois \ write \ - wtmpcvt \ xargs \ xinstall \ ${_xlint} \ @@ -338,6 +334,13 @@ SUBDIR+= usbhidaction SUBDIR+= usbhidctl .endif +.if ${MK_UTMPX} != "no" +SUBDIR+= last +SUBDIR+= users +SUBDIR+= who +SUBDIR+= wtmpcvt +.endif + .include SUBDIR:= ${SUBDIR:O} diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile index da50e175dc29..f448f036f5e6 100644 --- a/usr.sbin/Makefile +++ b/usr.sbin/Makefile @@ -3,8 +3,7 @@ .include -SUBDIR= ac \ - adduser \ +SUBDIR= adduser \ arp \ bootparamd \ burncd \ @@ -35,7 +34,6 @@ SUBDIR= ac \ inetd \ iostat \ kldxref \ - lastlogin \ mailwrapper \ makefs \ manctl \ @@ -90,7 +88,6 @@ SUBDIR= ac \ trpt \ tzsetup \ ugidfw \ - utxrm \ vipw \ wake \ watch \ @@ -299,6 +296,12 @@ SUBDIR+= usbconfig SUBDIR+= usbdump .endif +.if ${MK_UTMPX} != "no" +SUBDIR+= ac +SUBDIR+= lastlogin +SUBDIR+= utxrm +.endif + .if ${MK_WIRELESS} != "no" SUBDIR+= ancontrol SUBDIR+= wlandebug