为了国产化,系统安装的是中标麒麟
将开机自启动的脚本添加到 rc.local 文件中,每次启动会执行三次,不知道说明原因
还有一个诡异的是,每次用 xshell 新开一个窗口,也会执行 rc.local 里面的内容,而且也是三次
WARNING! The remote SSH server rejected X11 forwarding request.
Last login: Thu Dec 16 10:53:56 2021 from 192.168.90.101
cd "/usr/local/se901/manager"
hahah
hahah
hahah
[root@localhost ~]# cd "/usr/local/"
rc.local 文件
#!/bin/bash
# THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES
#
# It is highly advisable to create own systemd services or udev rules
# to run scripts during boot instead of using this file.
#
# In contrast to previous versions due to parallel execution during boot
# this script will NOT be run after all other services.
#
# Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure
# that this script will be executed during boot.
touch /var/lock/subsys/local
echo "hahah"
exit 0
看网上没有这方面的坑,不知道大佬有没有遇到过,劳烦指导一下,感激不尽!!!