From 3be1f17208a1e3d48c1c0607bff50402bc45ceb3 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sat, 29 Apr 2023 03:22:13 +0000 Subject: Prepare for 1.1.1.1; fix ctty passing when we have a logger Signed-off-by: Laurent Bercot --- INSTALL | 2 +- NEWS | 6 ++++++ doc/index.html | 4 ++-- doc/upgrade.html | 7 +++++++ package/info | 2 +- src/init/s6-linux-init.c | 8 ++++---- 6 files changed, 21 insertions(+), 8 deletions(-) diff --git a/INSTALL b/INSTALL index b8536d9..df09122 100644 --- a/INSTALL +++ b/INSTALL @@ -6,7 +6,7 @@ Build Instructions - A Linux-based system with a standard C development environment - GNU make version 3.81 or later - - skalibs version 2.13.1.1 or later: https://skarnet.org/software/skalibs/ + - skalibs version 2.13.2.0 or later: https://skarnet.org/software/skalibs/ - Optional: nsss version 0.2.0.3 or later: https://skarnet.org/software/nsss/ - Optional: utmps version 0.1.2.1 or later: https://skarnet.org/software/utmps/ - execline version 2.9.3.0 or later: https://skarnet.org/software/execline/ diff --git a/NEWS b/NEWS index f33518c..04d0428 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,11 @@ Changelog for s6-linux-init. +In 1.1.1.1 +---------- + + - Bugfixes. + + In 1.1.1.0 ---------- diff --git a/doc/index.html b/doc/index.html index 6aade8d..53a58dd 100644 --- a/doc/index.html +++ b/doc/index.html @@ -73,7 +73,7 @@ kernel command line
  • A Linux-based system with a standard C development environment
  • GNU make, version 3.81 or later
  • skalibs version -2.13.1.1 or later. It's a build-time requirement. It's also a run-time +2.13.2.0 or later. It's a build-time requirement. It's also a run-time requirement (for s6-linux-init-maker) as well as a boot-time requirement (i.e. a run-time requirement for the programs used when you boot a system created with @@ -110,7 +110,7 @@ want nsswitch-like functionality:
    • The current released version of s6-linux-init is -1.1.1.0.
    • +1.1.1.1.
    • Alternatively, you can checkout a copy of the s6-linux-init git repository: diff --git a/doc/upgrade.html b/doc/upgrade.html index 230d1e6..6bdb29b 100644 --- a/doc/upgrade.html +++ b/doc/upgrade.html @@ -18,6 +18,13 @@

      What has changed in s6-linux-init

      +

      in 1.1.1.1

      + +
        +
      • skalibs +dependency bumped to 2.13.2.0.
      • +
      +

      in 1.1.1.0

        diff --git a/package/info b/package/info index 9ce90b5..4d78ea1 100644 --- a/package/info +++ b/package/info @@ -1,4 +1,4 @@ package=s6-linux-init -version=1.1.1.0 +version=1.1.1.1 category=admin package_macro_name=S6_LINUX_INIT diff --git a/src/init/s6-linux-init.c b/src/init/s6-linux-init.c index 699b89f..103c233 100644 --- a/src/init/s6-linux-init.c +++ b/src/init/s6-linux-init.c @@ -204,10 +204,10 @@ int main (int argc, char const **argv, char const *const *envp) if (r) strerr_warnw1x("parent wrote to fd 3!") ; close(3) ; } - if (!slashdev && hasconsole && isatty(1)) + if (!slashdev && hasconsole && isatty(2 - nologger)) { - tty = ttyname(1) ; - if (!tty) strerr_warnwu1sys("ttyname stdout") ; + tty = ttyname(2 - nologger) ; + if (!tty) strerr_warnwu2sys("ttyname std", nologger ? "err" : "out") ; } } else if (hasconsole) allwrite(1, BANNER, sizeof(BANNER) - 1) ; @@ -300,7 +300,7 @@ int main (int argc, char const **argv, char const *const *envp) newenvp[0] = pathvar ; } if (nologger && pipe(notifpipe) < 0) strerr_diefu1sys(111, "pipe") ; - if (tty && !slashdev && ioctl(1, TIOCNOTTY) == -1) strerr_warnwu1sys("relinquish control terminal") ; + if (tty && !slashdev && ioctl(2 - nologger, TIOCNOTTY) == -1) strerr_warnwu1sys("relinquish control terminal") ; pid = fork() ; if (pid == -1) strerr_diefu1sys(111, "fork") ; -- cgit v1.2.3