mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-15 18:29:46 +00:00
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:
parent
520fa3376d
commit
9003d6e339
@ -13,7 +13,9 @@
|
|||||||
|
|
||||||
PATH=/sbin:/bin:/usr/bin:/usr/sbin
|
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
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
|
@ -7,11 +7,13 @@ use PVE::Cluster;
|
|||||||
my $nodename = PVE::INotify::nodename();
|
my $nodename = PVE::INotify::nodename();
|
||||||
my $localip = PVE::Cluster::remote_node_ip($nodename, 1);
|
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
|
$xline
|
||||||
|
|
||||||
@ -24,4 +26,14 @@ $xline
|
|||||||
|
|
||||||
__EOBANNER
|
__EOBANNER
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
$banner .= "Debian GNU/Linux 7.0 \\n \\l\n\n";
|
||||||
|
|
||||||
|
open(ISSUE, ">/etc/issue");
|
||||||
|
|
||||||
|
print ISSUE $banner;
|
||||||
|
|
||||||
|
close(ISSUE);
|
||||||
|
|
||||||
exit (0);
|
exit (0);
|
||||||
|
Loading…
Reference in New Issue
Block a user