forked from pool/systemd
35 lines
1.0 KiB
Diff
35 lines
1.0 KiB
Diff
The path for the serial 3270 console looks like (dev/)3270/tty1 which
|
|
causes trouble in the systemd-getty-generator as the add_symlink()
|
|
tries to make directories for each slash even for the slash after
|
|
the @ symbol in the final link name.
|
|
|
|
---
|
|
getty-generator.c | 9 +++++++++
|
|
1 file changed, 9 insertions(+)
|
|
|
|
--- systemd-210/src/getty-generator/getty-generator.c
|
|
+++ systemd-210/src/getty-generator/getty-generator.c 2014-03-14 14:13:09.296463091 +0000
|
|
@@ -67,6 +67,7 @@ static int add_symlink(const char *fserv
|
|
|
|
static int add_serial_getty(const char *tty) {
|
|
_cleanup_free_ char *n = NULL;
|
|
+ char *at;
|
|
|
|
assert(tty);
|
|
|
|
@@ -76,6 +77,14 @@ static int add_serial_getty(const char *
|
|
if (!n)
|
|
return log_oom();
|
|
|
|
+ if ((at = strchr(n, '@'))) {
|
|
+ char *sl;
|
|
+ while (*(++at) && (sl = strchr(at, '/'))) {
|
|
+ *sl = '-';
|
|
+ at = sl;
|
|
+ }
|
|
+ }
|
|
+
|
|
return add_symlink("serial-getty@.service", n);
|
|
}
|
|
|