5

解决更新Fedora 37后新版NUT(Network UPS Tools)无法连接UPS设备的问题

 1 year ago
source link: https://wusiyu.me/fix-fedora-37-new-nut-network-ups-tools-cannot-connect-ups-device/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

解决更新Fedora 37后新版NUT(Network UPS Tools)无法连接UPS设备的问题

%E6%88%AA%E5%B1%8F2023-01-22-06.17.53.png

在Fedora老版本上配置了NUT,每次开机后NUT服务均能正常与UPS连接;但在将系统更新至Fedora 37后,开机后NUT服务提示无法连接UPS,会周期性在终端广播报错,如果通过upsc指令查询UPS状态就会报错,如题图所示。

这个原因是因为在新版的nut软件包中,对于nut-driver服务的systemd配置文件发生了变化,旧的nut-driver.service被移除了,取而代之的是nut-driver-enumerator.service,后者再去启动nut-driver@<ups_name>.service(其中<ups_name>为配置文件中的UPS名称)。由于原本配置时enable的是nut-driver.service,现已不存在,而更新后nut-driver-enumerator.service并未被enable,因此nut-driver服务没有启动,导致nut-server、upsd和upsc等组件无法连接UPS。

解决方法也很简单,执行以下命令把nut-driver-enumerator.service启用即可:

systemctl enable --now nut-driver-enumerator.service

不得不说这个更新有点坑,但这也是系统跨版本更新时没办法的事情。

发布日期:2023年 1月 22日作者:WuSiYu
分类:Linux & homelab
2f33c5c8301def53ee2efd008260b73e?s=85&d=retro&r=r

作者:WuSiYu

学生,Web开发者,智能硬件&IOT爱好者

查看WuSiYu的所有文章。

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK