|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
From d7671242e5a5c43b4dd2ac7484816179a679c673 Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
Date: Thu, 19 Jun 2014 22:02:55 -0400
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
Subject: [PATCH] getty-generator: properly escape instance names
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
Otherwise the add_symlink() function tries to make directories for
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
each slash even for the slash after the @ symbol in the final link
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
name, failing for /dev/3270/tty1.
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
Based on a patch by Werner Fink <werner@suse.de>.
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
(cherry picked from commit a2ae516a25dafe41e0cd296ab7b5d022fa62b95f)
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
src/getty-generator/getty-generator.c | 4 ++--
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
diff --git a/src/getty-generator/getty-generator.c b/src/getty-generator/getty-generator.c
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
index 6a4aa2c1..700e90a3 100644
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
--- a/src/getty-generator/getty-generator.c
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+++ b/src/getty-generator/getty-generator.c
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
@@ -72,7 +72,7 @@ static int add_serial_getty(const char *tty) {
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
log_debug("Automatically adding serial getty for /dev/%s.", tty);
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
- n = unit_name_replace_instance("serial-getty@.service", tty);
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ n = unit_name_from_path_instance("serial-getty", tty, ".service");
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
if (!n)
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
return log_oom();
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
@@ -86,7 +86,7 @@ static int add_container_getty(const char *tty) {
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
log_debug("Automatically adding container getty for /dev/pts/%s.", tty);
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
- n = unit_name_replace_instance("container-getty@.service", tty);
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
+ n = unit_name_from_path_instance("container-getty", tty, ".service");
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
if (!n)
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
return log_oom();
|
|
Zbigniew Jędrzejewski-Szmek |
5509c0 |
|