linux的motd显示时间,linux – 当我使用SSH登录我的服务器时,显示了两个MOTD

我想更改登录到TTY上的计算机时显示的MOTD,这似乎有效,但不知何故,它不只是在/ etc / motd和/etc/update-motd.d/中显示MOTD ,还有另一条消息.

登录到我的服务器时显示:

sam@laptop:~$ssh @

Welcome to Ubuntu 12.04.2 LTS (GNU/Linux 2.6.32-042stab068.8 i686)

* Documentation: https://help.ubuntu.com/

No mail.

Last login: Thu Feb 21 19:20:55 2013 from

Welcome to Ubuntu 12.04.2 LTS (GNU/Linux 2.6.32-042stab068.8 i686)

* Documentation: https://help.ubuntu.com/

@:~$

我的update-motd.d包含两个文件,00-header和10-help-text.

00-header包含以下内容:

[ -r /etc/lsb-release ] && . /etc/lsb-release

if [ -z "$DISTRIB_DESCRIPTION" ] && [ -x /usr/bin/lsb_release ]; then

# Fall back to using the very slow lsb_release utility

DISTRIB_DESCRIPTION=$(lsb_release -s -d)

fi

printf "Welcome to %s (%s %s %s)\n" "$DISTRIB_DESCRIPTION" "$(uname -o)" "$(uname -r)" "$(uname -m)"

10-help-text包含:

[ -r /etc/lsb-release ] && . /etc/lsb-release

if [ -z "$DISTRIB_RELEASE" ] && [ -x /usr/bin/lsb_release ]; then

# Fall back to using the very slow lsb_release utility

DISTRIB_RELEASE=$(lsb_release -sr)

fi

URL="https://help.ubuntu.com/"

if uname -r | grep -qs "\-server"; then

URL="https://help.ubuntu.com/$DISTRIB_RELEASE/serverguide/C"

fi

printf "\n * Documentation: %s\n" "$URL"

这将弥补MOTD的部分,直到没有邮件..但其余部分来自哪里?


本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!

相关文章

立即
投稿

微信公众账号

微信扫一扫加关注

返回
顶部