core: 优化注释/代码

This commit is contained in:
bin456789
2023-09-21 00:12:35 +08:00
parent 3290e48c06
commit 7b453004dc
6 changed files with 73 additions and 59 deletions

View File

@ -188,9 +188,7 @@ extract_env_from_cmdline() {
value=$(echo $line | cut -d= -f2-)
eval "$key='$value'"
fi
done <<EOF
$(xargs -n1 </proc/cmdline | grep "^$prefix" | sed "s/^$prefix\.//")
EOF
done < <(xargs -n1 </proc/cmdline | grep "^$prefix" | sed "s/^$prefix\.//")
done
}
@ -691,7 +689,7 @@ download_cloud_init_config() {
download $confhome/nocloud.yaml $ci_file
# swapfile
# 如果分区表中已经有swap就跳过例如arch
# 如果分区表中已经有swapfile就跳过例如arch
if ! grep -w swap $os_dir/etc/fstab; then
# btrfs
if mount | grep 'on /os type btrfs'; then