【标题描述】时区定时检测脚本,当在一个检测周期内将时区从A修改为B,重启rsyslog服务,再修改回A后,无法检测到时区变化,rsyslog日志打印时间和系统时间时区会一直有差异
【环境信息】
【问题复现步骤】
1、修改时区A为时区B(cp /usr/share/zoneinfo/Africa/Luanda /etc/localtime),重启rsyslog
2、将时区B在修改回原来的A(cp /etc/localtime_bak /etc/localtime)
3、执行os_check_timezone_for_rsyslog.sh ,有预期结果1
【预期结果】
预期结果1:rsyslog被重启,/etc/localtime_tmp为A时区时间
【实际结果】
时区修改为B,rsyslog重启后日志打印时间戳变为B时区时间,但/etc/localtime_tmp文件未更新,仍记录A时区,当系统时区改回A后检测脚本判断localtime_tmp文件中的时区和系统时区一致,不会触发重启rsyslog,故日志打印时间戳会一直保持B时区,和系统实际时区不一致。
【附件信息】
Hi tttttty, welcome to the openEuler Community.
I'm the Bot here serving you. You can find the instructions on how to interact with me at Here.
If you have any questions, please contact the SIG: Base-service, and any of the maintainers: @yanan-rock , @Monday , @朱春意 , @hanxinke , @zhujianwei001 , @BigSkySea , @hexiaowen , @谢志鹏 , @syyhao , @chenjialong
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
22.03-LTS分支未合入
登录 后才可以发表评论