NetBSD/share
martin e8f8a078e5 Pull up following revision(s) (requested by maxv in ticket #1265):
etc/rc.d/smtoff: revision 1.1
	etc/rc.d/smtoff: revision 1.2
	distrib/sets/lists/etc/mi: revision 1.258
	etc/rc.d/smtoff: revision 1.3
	etc/rc.d/smtoff: revision 1.4
	etc/defaults/rc.conf: revision 1.148
	etc/rc.d/Makefile: revision 1.103
	usr.sbin/postinstall/postinstall: revision 1.226
	etc/rc.d/Makefile: revision 1.104
	etc/mtree/special: revision 1.167
	share/man/man5/rc.conf.5: revision 1.180

Add smtoff, an rc.d script that disables Simultaneous Multi-Threading. It
parses the output of cpuctl, and executes "cpuctl offline" for each CPU
that has SmtID!=0.

The default is "smtoff=NO", which means that SMT remains enabled.
Restructure code a little.

Use quoting everywhere possibly useful (always the right way, except
in the few cases where it is wrong...)

Avoid using cut & grep (from /usr/bin) so script could run before /usr
is mounted (pity cpuctl is in /usr/sbin ...).

Use sysctl -n rather than attempting to parse its output.
install rc.d

No change...   Previous log message should have said:
  Install rc.d/smtoff

I should know better!   Don't rely upon the way the shell implements
pipes.   Skip the "error" printf from GetSmtId() as there is no easy
portable way to avoid it occurring (there are complicated ways) - but
we don't need it, there is no logical difference between "error" and ""
so just use the latter (if we get an ID, good, if there is nothing, then
there is none - saying 'error' does not mean anything.)

Remove comment, since there is no parsing anymore.
2019-05-14 11:33:42 +00:00
..
dict Add `instantiate' 2017-06-03 07:30:50 +00:00
doc
examples Remove MKCRYPTO option. 2017-05-21 15:28:36 +00:00
i18n Pull up following revision(s) (requested by maya in ticket #874): 2018-06-09 15:43:34 +00:00
legal
locale
man Pull up following revision(s) (requested by maxv in ticket #1265): 2019-05-14 11:33:42 +00:00
me
misc Add TU/Tango-Uniform --> "tits up" 2017-05-29 06:54:01 +00:00
mk Pull up following revision(s) via patch (requested by mrg in ticket #1243): 2019-04-23 10:24:54 +00:00
nls
tabset
terminfo
tmac
wscons
xml
Makefile
Makefile.inc