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.
This commit is contained in:
Dietmar Maurer 2013-03-25 09:01:59 +01:00
parent 520fa3376d
commit 9003d6e339
2 changed files with 18 additions and 4 deletions

View File

@ -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)

View File

@ -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);