当前位置: 代码迷 >> 综合 >> openwrt 串口/SSH启动欢迎信息打印
  详细解决方案

openwrt 串口/SSH启动欢迎信息打印

热度:21   发布时间:2024-01-20 23:33:42.0

每次openwrt在启动完成后,使用串口或SSH进行连接的时候,总会出现如下的打印信息:

  _______                     ________        __|       |.-----.-----.-----.|  |  |  |.----.|  |_|   -   ||  _  |  -__|     ||  |  |  ||   _||   _||_______||   __|_____|__|__||________||__|  |____||__| W I R E L E S S   F R E E D O M-----------------------------------------------------BARRIER BREAKER (Barrier Breaker, unknown)-----------------------------------------------------* 1/2 oz Galliano         Pour all ingredients into* 4 oz cold Coffee        an irish coffee mug filled* 1 1/2 oz Dark Rum       with crushed ice. Stir.* 2 tsp. Creme de Cacao-----------------------------------------------------

那么,在很多定制系统或者我们自己做开发的时候,想要替换成我们想要的信息,怎么办?很简单,只需要替换掉配置文件就可以了。

启动欢迎界面的信息保存在 "/etc/banner"中:

root@seven:/etc# cat banner _______                     ________        __|       |.-----.-----.-----.|  |  |  |.----.|  |_|   -   ||  _  |  -__|     ||  |  |  ||   _||   _||_______||   __|_____|__|__||________||__|  |____||__| W I R E L E S S   F R E E D O M-----------------------------------------------------BARRIER BREAKER (Barrier Breaker, unknown)-----------------------------------------------------* 1/2 oz Galliano         Pour all ingredients into* 4 oz cold Coffee        an irish coffee mug filled* 1 1/2 oz Dark Rum       with crushed ice. Stir.* 2 tsp. Creme de Cacao-----------------------------------------------------
root@seven:/etc#

只需要使用我们需要展示的文件替换掉其中的内容,我们就可以在启动系统是看到我们自己的信息了

Connecting to 192.168.11.111:22...
Connection established.
To escape to local shell, press Ctrl+Alt+].BusyBox v1.22.1 (2018-12-22 11:52:37 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands._______                ______'/::\    \              /  \   \'/::::\    \            /::::\   \'/::::::\    \          /::::::\   \'/:::/\:::\    \        /:::/\:::\   \'|:::/__\:::\    \      /:::/  \:::\   \'   |:::\   \:::\    \    /::::\   \:::\   \'___\:::\   \:::\    \  /::::::\   \:::\   \'/\   \:::\   \:::\____\/:::/\:::\   \:::\___\'/::\   \:::\   \::/    /:::/  \:::\   \::/   /'\:::\   \:::\   \/____/\:::\   \:::\   \/___/'\:::\   \:::\____\     \:::\   \:::\   \ '\:::\   \:::|    |     \:::\   \:::\___\'\:::\  /:::|____|      \:::\   \::/   /'\:::\/:::/    /        \:::\   \/___/'\::::::/    /    \O/   \:::\   \'\::::/    /      |     \:::\___\'\__/____/      / \     \__/___/'root@seven:~#

我用SSH连接到设备的时候,显示的就不再是openwrt。

如果是在编译openwrt系统的时候,同样可以修改“./package/base-files/files/etc/banner”文件。