diff --git a/homepage/index.html b/homepage/index.html index 36b2c66..1ac027b 100644 --- a/homepage/index.html +++ b/homepage/index.html @@ -86,7 +86,6 @@ I'm vaccinated against COVID-19. Are you? cat(1), c78, software, -true(1), X200T; shilling: #stickers diff --git a/homepage/knowledge/software.html b/homepage/knowledge/software.html index 669bfe9..d24442b 100644 --- a/homepage/knowledge/software.html +++ b/homepage/knowledge/software.html @@ -16,7 +16,6 @@
@@ -35,6 +34,11 @@ Ultimately, the humans were the ones that produced the computers, and computers Try to be kind to everyone but don't take anything too seriously.
+
An ACPI client is a program that displays computer ACPI information, typically power and thermal statuses.
@@ -299,6 +303,10 @@ Make sure that service is added to runlevel boot.
Configuration is in /etc/conf.d/dmcrypt
and further configuration should be done in fstab
.
dm-crypt
will need the UUID of the physical block device while fstab (if being configured with UUIDs will need the UUID of the decrypted block device in the device mapper.
lspci(8)
, setpci(8)
, and update-pciids(
Do not use SSL workarounds like (in the case of git) GIT_SSL_NO_VERIFY
.
These leave your system open to man-in-the-middle attacks.
+rc.d
+
System logging
See syslogd(8)
and syslog.conf(5)
, which pertain to system logging.
Setting DDB_ONPANIC
(see options(4)
and sysctl(8)
) will save a crash dump at /var/crash
on kernel panic.
+
Upgrading
+
+- The NetBSD Guide - Chapter 4: Upgrading NetBSD
+- Upgrading NetBSD using sysinst
+
+
Power
Much of this can be configured in the ACPI settings in your login manager, provided you have one running that can do this.
@@ -401,6 +419,59 @@ Technically cat(1)
and other UNIX utilities can be used in a hacky
You'd be better off using ed(1)
; the UX is very similar.
+true(1)
+
+ - CHAMBERS John - The /bin/true Command and Copyright
+ - PIKE Rob - "/bin/true used to be an empty file."
+ - RAITER Brian - A Whirlwind Tutorial on Creating Really Teensy ELF Executables for Linux
+ - true(1p) (The Open Group, 2003)
+ - Notable true implementations
+ - ongoing started 1992 - GNU/coreutils - src/true.c
+ - ongoing forked from 4.4BSD-Lite2 - NetBSD/src - usr.bin/true/true.sh
+
+
+
+true(1)
is a tool that only quits silently with an exit status of 0.
+Similarly, false(1)
is a tool that only quits silently with an exit status of 1.
+Recognizing arguments, printing to standard output, reading from standard input, or otherwise exiting with any other status of 0, is a violation of the POSIX specification for true(1)
.
+These utilities find use in shell scripting, which, though extremely relevant to these utilities, is beyond the scope of this article.
+
+
+Because true(1)
's required functionality is so simple a POSIX-compliant implementation is a one-liner in most languages, so long as you're willing to make an exception in your code styling.
+For example, in C:
+
+
+int main(void) { return 0; }
+
+
+Because executing an empty shellscript file will in most shells do nothing and return an exit status of 0, technically an empty shellscript file is a POSIX-compliant true(1)
implementation in 0 bytes.
+This was the true(1)
implementation on early versions of UNIX, including Research UNIX, System V, and Sun's Solaris, according to both Rob Pike and John Chambers.
+A more explicit implementation also exists in POSIX shell:
+
+
+#!/bin/sh
+exit 0
+
+
+This happens to be nearly identical in source to the implementation used by NetBSD.
+
+
+Python has the same 0 byte true(1)
implementation feature as most shells.
+Here's false(1)
in Python rather than true(1)
to demonstrate how exiting with an arbitrary exit status can be done:
+
+
+import sys
+sys.exit(1)
+
+
+In some shells, true(1)
is a shell built-in command, so running true
will run the shell author's implementation of true(1)
rather than the system implementation.
+
+
+GNU true(1)
, from the GNU coreutils, is well known for being a maximalist implementation - it's eighty lines long and directly includes four C header files.
+Their true.c
is 2.3 kilobytes and parses the arguments --help
and --version
(only if either are the first argument to the program).
+The GNU coreutils implementation of true(1)
is not POSIX compliant.
+
+
util-linux
- util-linux - Wikipedia
@@ -426,7 +497,7 @@ network={
}
-See wpa_supplicant.conf(5).
+See wpa_supplicant.conf(5)
.
X
diff --git a/homepage/knowledge/true.html b/homepage/knowledge/true.html
deleted file mode 100644
index bcc4f0a..0000000
--- a/homepage/knowledge/true.html
+++ /dev/null
@@ -1,78 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-true(1)
-
-
-~ Return to the rest of the site
-
-
-
-POSIX true(1)
-updated 2021-08-18
-
-
-true(1)
is a tool that only quits silently with an exit status of 0.
-Similarly, false(1)
is a tool that only quits silently with an exit status of 1.
-Recognizing arguments, printing to standard output, reading from standard input, or otherwise exiting with any other status of 0, is a violation of the POSIX specification for true(1)
.
-These utilities find use in shell scripting, which, though extremely relevant to these utilities, is beyond the scope of this article.
-
-
-Because true(1)
's required functionality is so simple a POSIX-compliant implementation is a one-liner in most languages, so long as you're willing to make an exception in your code styling.
-For example, in C:
-
-
-int main(void) { return 0; }
-
-
-Because executing an empty shellscript file will in most shells do nothing and return an exit status of 0, technically an empty shellscript file is a POSIX-compliant true(1)
implementation in 0 bytes.
-This was the true(1)
implementation on early versions of UNIX, including Research UNIX, System V, and Sun's Solaris, according to both Rob Pike and John Chambers.
-A more explicit implementation also exists in POSIX shell:
-
-
-#!/bin/sh
-exit 0
-
-
-This happens to be nearly identical in source to the implementation used by NetBSD.
-
-
-Python has the same 0 byte true(1)
implementation feature as most shells.
-Here's false(1)
in Python rather than true(1)
to demonstrate how exiting with an arbitrary exit status can be done:
-
-
-import sys
-sys.exit(1)
-
-
-In some shells, true(1)
is a shell built-in command, so running true
will run the shell author's implementation of true(1)
rather than the system implementation.
-
-
-GNU true(1)
, from the GNU coreutils, deserves a special mention, as it's eighty lines long and directly includes four C header files.
-This is not a joke.
-Their true.c
is 2.3 kilobytes, parses the arguments --help
and --version
(only if either are the first argument to the program), and I don't know how big the executable ends up being because the first thing I do when I take control of a GNU system is dd if=/dev/null of="$(which true)";chmod +x "$(which true)"
(use at your own risk).
-The GNU coreutils implementation of true(1)
is not POSIX compliant.
-
-Cited media and further reading
- - Articles and posts
- - Manual pages
- - true(1p) (The Open Group, 2003)
-
- - Notable true implementations
- - ongoing started 1992 - GNU/coreutils - src/true.c
- - ongoing forked from 4.4BSD-Lite2 - NetBSD/src - usr.bin/true/true.sh
-
-
-
-