Add nologin.
diff --git a/toys/other/nologin.c b/toys/other/nologin.c new file mode 100644 index 0000000..851cd79 --- /dev/null +++ b/toys/other/nologin.c
@@ -0,0 +1,24 @@ +/* nologin.c - False with a message. + * + * Copyright 2025 Rob Landley <rob@landley.net> + * + * No standard. + +USE_NOLOGIN(NEWTOY(nologin, 0, TOYFLAG_BIN|TOYFLAG_NOHELP)) + +config NOLOGIN + bool "nologin" + default y + help + usage: nologin + + Print /etc/nologin.txt and return failure. +*/ + +#include "toys.h" + +void nologin_main(void) +{ + toys.exitval = 1; + puts(readfile("/etc/nologin.txt", 0, 0) ? : toys.which->name); +}