Commit d44735b0 authored by Dietmar Maurer's avatar Dietmar Maurer

pvebanner: overwrite /etc/issue instead of printing to stdout

That way be get the pve banner for all spanned getty.

We also create /etc/lsb-base-logging.sh and set FANCYTTY=0, because this
work better wit bootlogd (no control characters in /var/log/boot.
parent 3e7adb30
......@@ -13,7 +13,9 @@
PATH=/sbin:/bin:/usr/bin:/usr/sbin
test -f $PVEDAEMON || exit 0
test -f /usr/bin/pvebanner || exit 0
test -f /etc/lsb-base-logging.sh || echo "FANCYTTY=0" >/etc/lsb-base-logging.sh
case "$1" in
start)
......
......@@ -7,11 +7,13 @@ use PVE::Cluster;
my $nodename = PVE::INotify::nodename();
my $localip = PVE::Cluster::remote_node_ip($nodename, 1);
exit (0) if !$localip;
my $xline = '-' x 80;
my $xline = '-' x 78;
print <<__EOBANNER;
my $banner = '';
if ($localip) {
$banner .= <<__EOBANNER;
$xline
......@@ -24,4 +26,14 @@ $xline
__EOBANNER
}
$banner .= "Debian GNU/Linux 7.0 \\n \\l\n\n";
open(ISSUE, ">/etc/issue");
print ISSUE $banner;
close(ISSUE);
exit (0);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment