Skip to content

Commit

Permalink
opensuse: 修复禁用了 cloud-init 后,弹出了 jeos-firstboot
Browse files Browse the repository at this point in the history
  • Loading branch information
bin456789 committed Feb 8, 2025
1 parent d9e2231 commit 7d3d12d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions trans.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2699,6 +2699,21 @@ disable_cloud_init() {
done
}

disable_jeos_firstboot() {
os_dir=$1
info "Disable JeOS Firstboot"

# 两种方法都可以
# https://github.com/openSUSE/jeos-firstboot?tab=readme-ov-file#usage

rm -rf $os_dir/var/lib/YaST2/reconfig_system

for name in jeos-firstboot jeos-firstboot-snapshot; do
# 服务不存在时会报错
chroot $os_dir systemctl disable "$name.service" 2>/dev/null || true
done
}

create_network_manager_config() {
source_cfg=$1
os_dir=$2
Expand Down Expand Up @@ -2953,6 +2968,7 @@ EOF
find_and_mount /boot/efi

disable_cloud_init $os_dir
disable_jeos_firstboot $os_dir

# opensuse leap
if grep opensuse-leap $os_dir/etc/os-release; then
Expand Down

0 comments on commit 7d3d12d

Please # to comment.