[pve-devel] [PATCH container 2/2] alpine: fix getty line removal
Wolfgang Bumiller
w.bumiller at proxmox.com
Fri Oct 7 08:45:03 CEST 2016
and make it a little safer for debian, too
---
src/PVE/LXC/Setup/Alpine.pm | 2 +-
src/PVE/LXC/Setup/Debian.pm | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/PVE/LXC/Setup/Alpine.pm b/src/PVE/LXC/Setup/Alpine.pm
index 844a399..d69a0df 100644
--- a/src/PVE/LXC/Setup/Alpine.pm
+++ b/src/PVE/LXC/Setup/Alpine.pm
@@ -53,7 +53,7 @@ sub setup_init {
my @lines = grep {
# remove getty lines
- !/^\s*tty\d+::[^:]*:.*getty/
+ !/^\s*tty\d+:\d*:[^:]*:.*getty/
} split(/\n/, $inittab);
$inittab = join("\n", @lines) . "\n";
diff --git a/src/PVE/LXC/Setup/Debian.pm b/src/PVE/LXC/Setup/Debian.pm
index d529dde..1cca494 100644
--- a/src/PVE/LXC/Setup/Debian.pm
+++ b/src/PVE/LXC/Setup/Debian.pm
@@ -53,7 +53,7 @@ sub setup_init {
my @lines = grep {
# remove getty lines
- !/^\s*\d+:\d+:[^:]*:.*getty/ &&
+ !/^\s*\d+:\d*:[^:]*:.*getty/ &&
# remove power lines
!/^\s*p[fno0]:/
} split(/\n/, $inittab);
--
2.1.4
More information about the pve-devel
mailing list