initramfs fix
This commit is contained in:
@@ -104,7 +104,14 @@ PACMAN_UPDATE_LOG="$HOME/.local/state/miniserver/pacman-update.log"
|
||||
initramfs_build_failed() {
|
||||
[ -f "$PACMAN_UPDATE_LOG" ] || return 1
|
||||
grep -q "Updating linux initcpios" "$PACMAN_UPDATE_LOG" || return 1
|
||||
grep -q "==> ERROR" "$PACMAN_UPDATE_LOG" || ! grep -q "Image generation successful" "$PACMAN_UPDATE_LOG"
|
||||
grep -q "==> ERROR" "$PACMAN_UPDATE_LOG" && return 0
|
||||
|
||||
# Every image built must report success. Older mkinitcpio says "==> Image
|
||||
# generation successful", newer says "==> Initcpio image generation successful".
|
||||
local built succeeded
|
||||
built="$(grep -c "==> Building image from preset" "$PACMAN_UPDATE_LOG")"
|
||||
succeeded="$(grep -cE "==> (Initcpio i|I)mage generation successful" "$PACMAN_UPDATE_LOG")"
|
||||
(( succeeded == 0 || succeeded < built ))
|
||||
}
|
||||
|
||||
# Install a script atomically (copy to a temp file, then rename over the target)
|
||||
|
||||
Reference in New Issue
Block a user