Compare commits
75 Commits
Author | SHA256 | Date | |
---|---|---|---|
47d3b867f2 | |||
1b2aa00790 | |||
ace1ee1c8b | |||
e0c875431d | |||
c026ff2133 | |||
5c01a9cb1a | |||
7e45e8c880 | |||
c18d91a066 | |||
5ad3ce0431 | |||
b8b50bf2a1 | |||
2ea0931533 | |||
6e794a7400 | |||
643e2550e6 | |||
b3f76ee261 | |||
3aa875550f | |||
c0c23a77e3 | |||
5d5c3b00a7 | |||
95dd203fc6 | |||
ad6123a606 | |||
83782b7603 | |||
99d7c18e52 | |||
2e0df2bf10 | |||
916c6fd31f | |||
ab8f0c0c6f | |||
776aea12c7 | |||
29cdc3955c | |||
75b70c3749 | |||
29d84c4400 | |||
2a813f915b | |||
c53fe95a8d | |||
605a52cae9 | |||
451e24d974 | |||
345a922659 | |||
71920e0d25 | |||
48f341d394 | |||
a14db475b3 | |||
35f07ba1fc | |||
caddd1aeee | |||
786d7d1221 | |||
699304ae07 | |||
66fdbd7c0e | |||
a48adb8238 | |||
eda398a727 | |||
b485ef5408 | |||
8d17e1075e | |||
ee2dc02250 | |||
99e238f112 | |||
0a824181f3 | |||
08b0f50d71 | |||
937beaa81b | |||
ff85130878 | |||
f205f5ad48 | |||
ad71c6b12a | |||
ed3db58812 | |||
18c64f91f7 | |||
beb944a19d | |||
b3cd12f84e | |||
d6a13227fe | |||
3adfcee93f | |||
aaaaeb76f0 | |||
5d52c1c19b | |||
0b53bae596 | |||
18e030ae2b | |||
817afe55d0 | |||
78e891b012 | |||
3edc76c681 | |||
e0edcf7439 | |||
b23bae74cb | |||
f5b6663a7c | |||
188d49bbfa | |||
6cbc8d3b1f | |||
f7ca3d3e8c | |||
b5caa31ae1 | |||
7f367fdcee | |||
0e63481b64 |
134
blog-3215.patch
134
blog-3215.patch
@@ -1,134 +0,0 @@
|
||||
---
|
||||
blog.service | 1 +
|
||||
blogd.c | 2 +-
|
||||
libconsole/console.c | 8 +++++++-
|
||||
libconsole/tty.c | 11 +++++++++++
|
||||
systemd-ask-password-blog.path | 7 +++++--
|
||||
systemd-ask-password-blog.service | 9 ++++++---
|
||||
6 files changed, 31 insertions(+), 7 deletions(-)
|
||||
|
||||
--- blog.service
|
||||
+++ blog.service 2025-04-17 13:09:41.774994278 +0000
|
||||
@@ -6,6 +6,7 @@ After=systemd-vconsole-setup.service sys
|
||||
Before=systemd-ask-password-blog.service
|
||||
ConditionKernelCommandLine=!blog.enable=0
|
||||
ConditionVirtualization=!container
|
||||
+ConditionPathExists=/dev/console
|
||||
IgnoreOnIsolate=true
|
||||
RefuseManualStart=true
|
||||
|
||||
--- blogd.c
|
||||
+++ blogd.c 2025-04-17 12:23:43.672968636 +0000
|
||||
@@ -325,7 +325,7 @@ int main(int argc, char *argv[])
|
||||
o.c_cc[VMIN] = CMIN;
|
||||
}
|
||||
#if defined(__s390__) || defined(__s390x__)
|
||||
- if (major(c->dev) == 4 && minor(c->dev) == 65) {
|
||||
+ if (major(c->dev) == 4 && minor(c->dev) == 64) {
|
||||
ioctl(c->fd, TIOCSBRK);
|
||||
usleep(1000);
|
||||
}
|
||||
--- systemd-ask-password-blog.path
|
||||
+++ systemd-ask-password-blog.path 2025-04-17 13:09:00.655744933 +0000
|
||||
@@ -2,9 +2,12 @@
|
||||
Description=Forward Password Requests to Plymouth Directory Watch
|
||||
Documentation=http://www.freedesktop.org/wiki/Software/systemd/PasswordAgents
|
||||
DefaultDependencies=no
|
||||
-Conflicts=shutdown.target
|
||||
After=blog.service
|
||||
-Before=basic.target shutdown.target
|
||||
+Before=paths.target cryptsetup.target
|
||||
+Conflicts=emergency.service
|
||||
+Before=emergency.service
|
||||
+Conflicts=shutdown.target
|
||||
+Before=shutdown.target
|
||||
ConditionKernelCommandLine=!blog.enable=0
|
||||
ConditionPathExists=/run/blogd.pid
|
||||
ConditionVirtualization=!container
|
||||
--- systemd-ask-password-blog.service
|
||||
+++ systemd-ask-password-blog.service 2025-04-17 13:08:53.699871915 +0000
|
||||
@@ -2,12 +2,15 @@
|
||||
Description=Forward Password Requests to Blogd as a Plymouth agent
|
||||
Documentation=http://www.freedesktop.org/wiki/Software/systemd/PasswordAgents
|
||||
DefaultDependencies=no
|
||||
-Conflicts=shutdown.target
|
||||
-After=blog.service
|
||||
-Before=shutdown.target
|
||||
+After=blog.service systemd-vconsole-setup.service
|
||||
+Conflicts=emergency.service
|
||||
+Before=emergency.service
|
||||
+Conflicts=shutdown.target initrd-switch-root.target
|
||||
+Before=shutdown.target initrd-switch-root.target
|
||||
ConditionKernelCommandLine=!blog.enable=0
|
||||
ConditionVirtualization=!container
|
||||
ConditionPathExists=/run/blogd.pid
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/systemd-tty-ask-password-agent --watch --plymouth
|
||||
+SystemCallArchitectures=native
|
||||
--- libconsole/console.c
|
||||
+++ libconsole/console.c 2025-04-17 12:44:55.791489867 +0000
|
||||
@@ -598,11 +598,17 @@ static int consinitIO(struct console *ne
|
||||
memset(&newc->ltio, 0, sizeof(newc->ltio));
|
||||
memset(&newc->otio, 0, sizeof(newc->otio));
|
||||
memset(&newc->ctio, 0, sizeof(newc->ctio));
|
||||
+
|
||||
+#if defined(__s390__) || defined(__s390x__)
|
||||
+ if (major(newc->dev) == 4 && minor(newc->dev) == 64)
|
||||
+ return 1;
|
||||
+#endif
|
||||
if ((tflags = fcntl(newc->fd, F_GETFL)) < 0)
|
||||
warn("can not get terminal flags of %s", newc->tty);
|
||||
|
||||
tflags &= ~(O_NONBLOCK);
|
||||
tflags |= O_NOCTTY;
|
||||
+
|
||||
if (fcntl(newc->fd, F_SETFL, tflags) < 0)
|
||||
warn("can not set terminal flags of %s", newc->tty);
|
||||
|
||||
@@ -1319,7 +1325,7 @@ static void ask_for_password(void)
|
||||
(major(c->dev) == 227 && minor(c->dev) >= 1))
|
||||
len = asprintf(&message, BOLD RED "\n\r%s: " NORM, pwprompt);
|
||||
else
|
||||
- len = asprintf(&message, "\n\r>> %s: ", pwprompt);
|
||||
+ len = asprintf(&message, "\n\r===>> %s: ", pwprompt);
|
||||
#else
|
||||
if (c->flags & CON_SERIAL)
|
||||
len = asprintf(&message, BOLD RED "\n\r%s: " NORM, pwprompt);
|
||||
--- libconsole/tty.c
|
||||
+++ libconsole/tty.c 2025-04-17 12:52:55.030111493 +0000
|
||||
@@ -15,6 +15,7 @@
|
||||
#include <signal.h>
|
||||
#include <sys/inotify.h>
|
||||
#include <sys/ioctl.h>
|
||||
+#include <sys/sysmacros.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
@@ -52,6 +53,9 @@ int request_tty(const char *tty)
|
||||
{
|
||||
struct sigaction saved_sighup;
|
||||
int fd = -1, nd, wd;
|
||||
+#if defined(__s390__) || defined(__s390x__)
|
||||
+ struct stat sb;
|
||||
+#endif
|
||||
|
||||
fd = open("/dev/tty", O_RDWR|O_NOCTTY|O_CLOEXEC|O_NONBLOCK);
|
||||
if (fd >= 0) {
|
||||
@@ -95,9 +99,16 @@ int request_tty(const char *tty)
|
||||
break;
|
||||
}
|
||||
|
||||
+#if defined(__s390__) || defined(__s390x__)
|
||||
+ if (fstat(fd, &sb) == 0 && major(sb.st_dev) == 4 && minor(sb.st_dev) == 64)
|
||||
+ goto noblock;
|
||||
+#endif
|
||||
flags = fcntl(fd, F_GETFL);
|
||||
flags &= ~O_NONBLOCK;
|
||||
fcntl(fd, F_SETFL, flags);
|
||||
+#if defined(__s390__) || defined(__s390x__)
|
||||
+ noblock:
|
||||
+#endif
|
||||
|
||||
if (ret >= 0)
|
||||
break; /* Success */
|
@@ -1,129 +0,0 @@
|
||||
---
|
||||
Makefile | 71 +++++++++++++++--------------------------
|
||||
blog-store-messages.service.in | 4 ++
|
||||
module-setup.sh | 4 +-
|
||||
3 files changed, 32 insertions(+), 47 deletions(-)
|
||||
|
||||
--- Makefile
|
||||
+++ Makefile 2025-04-17 09:16:07.090977206 +0000
|
||||
@@ -137,50 +137,28 @@ install: $(TODO)
|
||||
$(INSTSCR) module-setup.sh $(DESTDIR)$(DRACUTMOD)/
|
||||
$(LINK) libblogger.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libblogger.so.$(MAJOR)
|
||||
$(LINK) libblogger.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libblogger.so
|
||||
- for unit in blog blog-final blog-quit blog-store-messages blog-switch-root blog-switch-initramfs blog-umount ; do \
|
||||
- $(INSTCON) $${unit}.service $(DESTDIR)$(SYSDUNITS)/ ; \
|
||||
- done
|
||||
- for unit in systemd-ask-password-blog.path systemd-ask-password-blog.service ; do \
|
||||
- $(INSTCON) $${unit} $(DESTDIR)$(SYSDUNITS)/ ; \
|
||||
- done
|
||||
- for target in default sysinit basic local-fs-pre halt rescue shutdown reboot poweroff kexec emergency initrd-switch-root; do \
|
||||
- $(MKDIR) $(DESTDIR)$(SYSDUNITS)/$${target}.target.wants ; \
|
||||
- done
|
||||
- for service in systemd-ask-password-blog ; do \
|
||||
- $(MKDIR) $(DESTDIR)$(SYSDUNITS)/$${target}.service.wants ; \
|
||||
- done
|
||||
- for unit in blog-quit.service ; do \
|
||||
- $(LINK) ../$${unit} $(DESTDIR)$(SYSDUNITS)/default.target.wants/$${unit} ; \
|
||||
- $(LINK) ../$${unit} $(DESTDIR)$(SYSDUNITS)/rescue.target.wants/$${unit} ; \
|
||||
- $(LINK) ../$${unit} $(DESTDIR)$(SYSDUNITS)/emergency.target.wants/$${unit} ; \
|
||||
- done
|
||||
- for unit in blog.service ; do \
|
||||
- $(LINK) ../$${unit} $(DESTDIR)$(SYSDUNITS)/basic.target.wants/$${unit} ; \
|
||||
- done
|
||||
- for unit in blog-store-messages.service systemd-ask-password-blog.path ; do \
|
||||
- $(LINK) ../$${unit} $(DESTDIR)$(SYSDUNITS)/sysinit.target.wants/$${unit} ; \
|
||||
- done
|
||||
- for unit in blog-umount.service ; do \
|
||||
- $(LINK) ../$${unit} $(DESTDIR)$(SYSDUNITS)/local-fs-pre.target.wants/$${unit} ; \
|
||||
- done
|
||||
- for unit in blog-switch-initramfs.service ; do \
|
||||
- $(LINK) ../$${unit} $(DESTDIR)$(SYSDUNITS)/reboot.target.wants/$${unit} ; \
|
||||
- $(LINK) ../$${unit} $(DESTDIR)$(SYSDUNITS)/poweroff.target.wants/$${unit} ; \
|
||||
- $(LINK) ../$${unit} $(DESTDIR)$(SYSDUNITS)/kexec.target.wants/$${unit} ; \
|
||||
- $(LINK) ../$${unit} $(DESTDIR)$(SYSDUNITS)/halt.target.wants/$${unit} ; \
|
||||
- done
|
||||
- for unit in reboot poweroff kexec halt ; do \
|
||||
- $(LINK) ../blog-$${unit}.service $(DESTDIR)$(SYSDUNITS)/$${unit}.target.wants/blog-$${unit}.service ; \
|
||||
- done
|
||||
- for target in systemd-ask-password-blog.service ; do \
|
||||
- $(MKDIR) $(DESTDIR)$(SYSDUNITS)/$${target}.wants ; \
|
||||
- done
|
||||
- for unit in blog.service blog-switch-root.service ; do \
|
||||
- $(LINK) ../$${unit} $(DESTDIR)$(SYSDUNITS)/initrd-switch-root.target.wants/$${unit} ; \
|
||||
- done
|
||||
- for unit in systemd-vconsole-setup.service ; do \
|
||||
- $(LINK) ../$${unit} $(DESTDIR)$(SYSDUNITS)/systemd-ask-password-blog.service.wants/$${unit} ; \
|
||||
- done
|
||||
+ @set +x; \
|
||||
+ export initdir=$(DESTDIR); \
|
||||
+ export systemdsystemunitdir=$(SYSDUNITS); \
|
||||
+ inst_multiple () { \
|
||||
+ if test $$1 = -o; then \
|
||||
+ shift; \
|
||||
+ for o; do \
|
||||
+ test -e $${o##*/} && command install -vp -m 0644 $${o##*/} $${initdir}$${o} || : ; \
|
||||
+ done; \
|
||||
+ else \
|
||||
+ command install -vp -m 0755 $${1##*/} $${initdir}$(SBINDIR)/; \
|
||||
+ fi; \
|
||||
+ }; \
|
||||
+ ln_r () { \
|
||||
+ local rel="$$(realpath -m --relative-to=$${2%/*}/ $${1%/*}/)"; \
|
||||
+ ln -sf $${rel}/$${1##*/} $${initdir}$${2}; }; \
|
||||
+ . ./module-setup.sh ; \
|
||||
+ set -xe; install
|
||||
+ $(MKDIR) $(DESTDIR)$(SYSDUNITS)/local-fs-pre.target.wants
|
||||
+ $(MKDIR) $(DESTDIR)$(SYSDUNITS)/default.target.wants
|
||||
+ $(LINK) ../blog-umount.service $(DESTDIR)$(SYSDUNITS)/local-fs-pre.target.wants/
|
||||
+ $(LINK) ../blog-quit.service $(DESTDIR)$(SYSDUNITS)/default.target.wants/
|
||||
|
||||
#
|
||||
# Make distribution
|
||||
@@ -205,8 +183,11 @@ FILES = README \
|
||||
isserial.c \
|
||||
isserial.8 \
|
||||
blog.service \
|
||||
- blog-final.service \
|
||||
+ blog-halt.service \
|
||||
+ blog-kexec.service \
|
||||
+ blog-poweroff.service \
|
||||
blog-quit.service \
|
||||
+ blog-reboot.service \
|
||||
blog-store-messages.service.in \
|
||||
blog-switch-root.service \
|
||||
blog-switch-initramfs.service \
|
||||
--- blog-store-messages.service.in
|
||||
+++ blog-store-messages.service.in 2025-04-17 09:01:01.507551296 +0000
|
||||
@@ -1,9 +1,13 @@
|
||||
[Unit]
|
||||
Description=Tell blogd about writable boot log
|
||||
DefaultDependencies=no
|
||||
+RequiresMountsFor=/var/log/boot.log
|
||||
+Conflicts=shutdown.target
|
||||
+After=systemd-remount-fs.service systemd-tmpfiles-setup.service auditd.service
|
||||
After=local-fs.target
|
||||
Before=sysinit.target
|
||||
ConditionPathExists=!/etc/initrd-release
|
||||
+ConditionPathIsReadWrite=/var/log
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
--- module-setup.sh
|
||||
+++ module-setup.sh 2025-04-17 08:33:37.601635305 +0000
|
||||
@@ -34,14 +34,14 @@ install() {
|
||||
ln_r "${systemdsystemunitdir}/${s}" "${systemdsystemunitdir}/rescue.target.wants/${s}"
|
||||
ln_r "${systemdsystemunitdir}/${s}" "${systemdsystemunitdir}/emergency.target.wants/${s}"
|
||||
done
|
||||
- for s in blog.service systemd-ask-password-blog.path
|
||||
+ for s in blog.service blog-store-messages.service
|
||||
do
|
||||
ln_r "${systemdsystemunitdir}/${s}" "${systemdsystemunitdir}/sysinit.target.wants/${s}"
|
||||
done
|
||||
for u in reboot poweroff kexec halt
|
||||
do
|
||||
ln_r "${systemdsystemunitdir}/blog-${u}.service" "${systemdsystemunitdir}/${u}.target.wants/blog-${u}.service"
|
||||
- ln_r "${systemdsystemunitdir}/blog-switch-initramfs.service" "${systemdsystemunitdir}/${u}.target.wants/blog-switch-initramfs"
|
||||
+ ln_r "${systemdsystemunitdir}/blog-switch-initramfs.service" "${systemdsystemunitdir}/${u}.target.wants/blog-switch-initramfs.service"
|
||||
done
|
||||
for t in systemd-ask-password-blog.service
|
||||
do
|
BIN
showconsole-2.34.tar.gz
(Stored with Git LFS)
BIN
showconsole-2.34.tar.gz
(Stored with Git LFS)
Binary file not shown.
Reference in New Issue
Block a user