chore: clean ouput and add comments to installed scripts
This commit is contained in:
parent
551423eb4a
commit
8919c61568
|
@ -240,14 +240,16 @@ function disk_create_partition() {
|
|||
|| die "Could not create new gpt partition ($new_id) on '$device' ($id)"
|
||||
partprobe "$device"
|
||||
|
||||
# On some system, we need to wait a bit for the $new_id symlink to show up.
|
||||
# On some system, we need to wait a bit for the partition to show up.
|
||||
local new_device
|
||||
new_device="$(resolve_device_by_id "$new_id")" \
|
||||
|| die "Could not resolve new device with id=$new_id"
|
||||
for i in {1..10}; do
|
||||
[[ -f "$new_device" ]] && break
|
||||
echo "Waiting for partition $new_device to appear, $i second..."
|
||||
[[ -e "$new_device" ]] && break
|
||||
[[ "$i" -eq 1 ]] && printf "Waiting for partition ($new_device) to appear..."
|
||||
printf " $((10 - i + 1))"
|
||||
sleep 1
|
||||
[[ "$i" -eq 10 ]] && echo
|
||||
done
|
||||
}
|
||||
|
||||
|
|
|
@ -161,7 +161,7 @@ function generate_initramfs() {
|
|||
cat > "$(dirname "$output")/generate_initramfs.sh" <<EOF
|
||||
#!/bin/bash
|
||||
kver="\$1"
|
||||
output="\$2"
|
||||
output="\$2" # At setup time, this was "$output"
|
||||
[[ -n "\$kver" ]] || { echo "usage \$0 <kernel_version> <output>" >&2; exit 1; }
|
||||
dracut \\
|
||||
--kver "\$kver" \\
|
||||
|
@ -171,7 +171,7 @@ dracut \\
|
|||
--add "bash ${modules[*]}" \\
|
||||
${dracut_opts[@]@Q} \\
|
||||
--force \\
|
||||
"$output"
|
||||
"\$output"
|
||||
EOF
|
||||
}
|
||||
|
||||
|
@ -216,6 +216,8 @@ function install_kernel_efi() {
|
|||
# Create script to repeat adding efibootmgr entry
|
||||
cat > "/boot/efi/efibootmgr_add_entry.sh" <<EOF
|
||||
#!/bin/bash
|
||||
# This is the command that was used to create the efibootmgr entry when the
|
||||
# system was installed using gentoo-install.
|
||||
efibootmgr --verbose --create --disk "$gptdev" --part "$efipartnum" --label "gentoo" --loader '\\vmlinuz.efi' --unicode 'initrd=\\initramfs.img'" $(get_cmdline)"
|
||||
EOF
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue