summaryrefslogtreecommitdiffstats
path: root/source/a/sysvinit
diff options
context:
space:
mode:
Diffstat (limited to 'source/a/sysvinit')
-rwxr-xr-xsource/a/sysvinit/sysvinit.SlackBuild9
-rw-r--r--source/a/sysvinit/sysvinit.no.console.agetty.without.sysvinit_agetty.diff16
2 files changed, 24 insertions, 1 deletions
diff --git a/source/a/sysvinit/sysvinit.SlackBuild b/source/a/sysvinit/sysvinit.SlackBuild
index b74de22a6..92472cb44 100755
--- a/source/a/sysvinit/sysvinit.SlackBuild
+++ b/source/a/sysvinit/sysvinit.SlackBuild
@@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=sysvinit
VERSION=${VERSION:-2.90}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -62,6 +62,13 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+# sysvinit-2.90 added an undocumented feature that tries to spawn agetty if
+# it sees console= in the kernel command line. Avoiding the debate about
+# whether this code belongs in init at all, at least such a change # should
+# be documented, and probably made opt-in. This patch disables the new behavior
+# unless "sysvinit_agetty" is also seen in the kernel command line.
+zcat $CWD/sysvinit.no.console.agetty.without.sysvinit_agetty.diff.gz | patch -p1 -E --verbose --backup --suffix=.orig || exit 1
+
# Fix paths for /etc/forcefsck and /etc/fastboot:
zcat $CWD/sysvinit.paths.diff.gz | patch -p1 -E --verbose --backup --suffix=.orig || exit 1
diff --git a/source/a/sysvinit/sysvinit.no.console.agetty.without.sysvinit_agetty.diff b/source/a/sysvinit/sysvinit.no.console.agetty.without.sysvinit_agetty.diff
new file mode 100644
index 000000000..c81f542bc
--- /dev/null
+++ b/source/a/sysvinit/sysvinit.no.console.agetty.without.sysvinit_agetty.diff
@@ -0,0 +1,16 @@
+--- ./src/init.c.orig 2018-06-18 18:25:26.000000000 -0500
++++ ./src/init.c 2018-08-28 23:45:05.134948889 -0500
+@@ -1337,6 +1337,13 @@
+ return;
+ }
+ if (fgets(buf, sizeof(buf), fp)) {
++ /* OK, this is a weird undocumented feature. We'll look for "sysvinit_agetty" in the kernel */
++ /* command line and if we don't see it, then we'll assume you didn't want this. */
++ char* t = buf;
++ if (!(t = strstr(t, "sysvinit_agetty"))) {
++ fclose(fp);
++ return;
++ }
+ char* p = buf;
+ while ((p = strstr(p, "console="))) {
+ char* e;