Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3564e68

Browse files
committed
simplify showmotd
1 parentbe9fa5a commit3564e68

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

‎agent/agentssh/agentssh.go

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -452,15 +452,10 @@ func (s *Server) startPTYSession(logger slog.Logger, session ptySession, magicTy
452452
}
453453

454454
if!isQuietLogin(s.fs,session.RawCommand()) {
455-
motdFile:=s.config.MOTDFile()
456-
ifmotdFile!="" {
457-
err:=showMOTD(s.fs,session,motdFile)
458-
iferr!=nil {
459-
logger.Error(ctx,"agent failed to show MOTD",slog.Error(err))
460-
s.metrics.sessionErrors.WithLabelValues(magicTypeLabel,"yes","motd").Add(1)
461-
}
462-
}else {
463-
logger.Warn(ctx,"metadata lookup failed, unable to show MOTD")
455+
err:=showMOTD(s.fs,session,s.config.MOTDFile())
456+
iferr!=nil {
457+
logger.Error(ctx,"agent failed to show MOTD",slog.Error(err))
458+
s.metrics.sessionErrors.WithLabelValues(magicTypeLabel,"yes","motd").Add(1)
464459
}
465460
}
466461

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp