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 1315686
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions trans.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2699,6 +2699,20 @@ disable_cloud_init() {
done
}

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

# 两种方法都可以

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 +2967,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 1315686

Please # to comment.