For those continuing to SysVinit as the aging init system that in the Linux world has been largely replaced by systemd, SysVinit 3.14 is out today and overcomes a long-standing limitation around the length of lines within the inittab files.
The biggest change in SysVinit 3.14 is overcoming the 127 character per line limit of inittab files that has been there for roughly the past three decades. With SysVinit moving forward, inittab lines can be up to 253 characters long… Those with really long inittab lines are really best off punting off that logic to a shell script that can then be called from the inittab.
Today’s SysVinit 3.14 release announcement elaborates on the change:
“The biggest change in this version concerns the inittab configuration file. For years the maximum line length of an entry in the inittab file was about 127 characters. Which, for most situations was fine, and seemed to do the trick for the past 30 years. However, there were two problems there.
First, if someone wanted to run a longer command, something longer than a classic terminal screen was wide, then the command wouldn’t be accepted by init. The bigger issue, in my mind, was how long lines were handled. If you had a lone longer than about 127 characters it would get truncated and then init would try it run whatever remained anyway.
The classic truncate-and-run behaviour was potentially dangerous. Because, while most people don’t put giant commands in their inittab file, if they did this could result in unexpected behaviour. One doesn’t want their init program to truncate a clean-up command line from “rm -rf /var/tmp” to just “rm -rf /var”, for example.
So while approximately 127 characters has been enough for most people for 30 years, this behaviour was dodgy and needed to be fixed. Now inittab entries can be 253 characters long AND it logs a warning when a line longer than this is found AND it refuses to run a line longer than 253 characters. It doesn’t truncate too-long lines anymore, it just drops them.
I think most people were putting long lines and complex logic in their shell scripts anyway, but this is just additional protection against potential problems.”
The other SysVinit 3.14 changes are small with some man page updates and adding back the “DESTDIR” variable support in its Makefile.
More details and downloads for SysVinit 3.14 via GitHub.