simp config SetHostnameAction edits /etc/sysconfig/network and calls ifdown/ifup
还没有人认领这个 Issue。
评估
调研方向
Start with lib/simp/cli/config/items/action/set_hostname_action.rb, lines 33-34 (sed on /etc/sysconfig/network) and line 62 (ifdown/ifup), and read #223 for the sibling ConfigureNetworkAction. The change replaces both with hostnamectl and nmcli, and the issue leaves open whether the installer still creates the file, so confirm that before editing. Done means the action no longer depends on that file or on the ifup/ifdown binaries, with the existing specs passing on EL8-EL10.
由索引模型根据 Issue 内容生成。
描述
Problem
lib/simp/cli/config/items/action/set_hostname_action.rb:
- lines 33-34 run
sed -i '/HOSTNAME/d' /etc/sysconfig/networkand appendHOSTNAME=to it; - line 62 runs
/sbin/ifdown <interface>; /sbin/ifup <interface>; - the action is fatal on failure.
No package on EL8, EL9 or EL10 owns /etc/sysconfig/network, and it is absent from the AlmaLinux container images. ifup and ifdown come from network-scripts on EL8 and NetworkManager-initscripts-updown on EL9; nothing provides them on EL10.
Impact
Where the file is missing, sed -i fails and simp config aborts. On EL10 the interface bounce cannot run. Whether a full installer-built system still creates the file was not checked.
Proposed change
Set the hostname with hostnamectl set-hostname only, and replace ifdown/ifup with nmcli. Related: #223, which covers ConfigureNetworkAction.
🤖 Drafted by Claude.
- 主要语言
- Ruby
- 星标
- 2
- 派生
- 12
- 平均合并
- 1 天 13 小时
- 30 天内合并 PR
- 4
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
simp/rubygem-simp-cli 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 79/100
simp/rubygem-simp-cli#238 ·
-
难度 2/5 1-3 小时 新手友好度 78/100
simp/rubygem-simp-cli#236 ·
-
simp config: write sssd::domains_entries instead of the deprecated sssd::domains可能已有人在做 @silug 于 4 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
simp/rubygem-simp-cli#227 ·
-
needs-attention
难度 5/5 一周以上 新手友好度 30/100
simp/rubygem-simp-cli#223 ·
-
难度 2/5 1-3 小时 新手友好度 25/100
simp/rubygem-simp-cli#200 ·
查看 simp/rubygem-simp-cli 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 74/100
simp/pupmod-simp-pki#163 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
resend/resend-ruby#266 ·
维护者通常 5 天内回复
-
难度 1/5 1 小时以内 新手友好度 82/100
SeleniumHQ/selenium#18323 ·
维护者通常 1 天内回复
-
Bug Ruby
难度 2/5 1-3 小时 新手友好度 76/100
getsentry/sentry-ruby#3211 · 1 条评论 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 69/100
danbooru/fumimi-discord#63 ·