diff options
author | maximilian attems <maks@debian.org> | 2006-12-14 23:16:15 +0100 |
---|---|---|
committer | maximilian attems <maks@debian.org> | 2006-12-14 23:16:15 +0100 |
commit | c03e70312632212c516acac750cb5ec0ef4b33cb (patch) | |
tree | 3f4e21b8e4b200853c6b1a39dbf3e71c369189a2 /update-initramfs | |
parent | 78fe68bcad9d0850e6b9877903719cab7c73b475 (diff) | |
download | initramfs-tools-c03e70312632212c516acac750cb5ec0ef4b33cb.tar.gz initramfs-tools-c03e70312632212c516acac750cb5ec0ef4b33cb.zip |
- show lilo error on lilo failure
- add hppa zalon module
- reduce size due to keeping only 1 busybox copy
- warn on update mode when no initramfs exist and takeover not specified
Diffstat (limited to 'update-initramfs')
-rwxr-xr-x | update-initramfs | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/update-initramfs b/update-initramfs index 4b230d0..52e603b 100755 --- a/update-initramfs +++ b/update-initramfs @@ -134,11 +134,13 @@ generate_initramfs() # lilo call run_lilo() { - # suppress errors on test run - lilo -t > /dev/null 2>&1 - if [ $? -eq 0 ]; then - lilo + # show lilo errors on failure + if ! lilo -t > /dev/null 2>&1 ; then + echo "update-initramfs: lilo run failed for ${initramfs}:" + echo + lilo -t fi + lilo } # check if lilo is on mbr @@ -387,14 +389,16 @@ delete() rm -f "${initramfs}" } - +# Check for update mode on existing and modified initramfs altered_check() { - if [ "${takeover}" = 0 ]; then - if ! compare_sha1; then - delete_sha1 - mild_panic "${initramfs} has been altered. Cannot update." - fi + # No check on takeover + [ "${takeover}" = 1 ] && return 0 + if [ ! -e "${initramfs}" ]; then + mild_panic "${initramfs} does not exist. Cannot update." + fi + if ! compare_sha1; then + mild_panic "${initramfs} has been altered. Cannot update." fi } |