diff options
author | maximilian attems <maks@debian.org> | 2009-09-25 19:46:29 +0200 |
---|---|---|
committer | maximilian attems <maks@debian.org> | 2009-09-25 19:46:29 +0200 |
commit | c1fa297a9342bcf4750c4b6f1000e5cd364049f8 (patch) | |
tree | c15e0887e7d44de69c1b51a42448f75f021f95ef /update-initramfs | |
parent | 072ad3179c526b90b57719e127de851182b04c4c (diff) | |
download | initramfs-tools-c1fa297a9342bcf4750c4b6f1000e5cd364049f8.tar.gz initramfs-tools-c1fa297a9342bcf4750c4b6f1000e5cd364049f8.zip |
update-initramfs: allow -t takeover on delete
needed to have idempotent delete
Diffstat (limited to 'update-initramfs')
-rwxr-xr-x | update-initramfs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/update-initramfs b/update-initramfs index 29941f3..255265f 100755 --- a/update-initramfs +++ b/update-initramfs @@ -429,12 +429,14 @@ delete() set_initramfs - if [ ! -e "${initramfs}" ]; then - panic "Cannot delete ${initramfs}, doesn't exist." - fi + if [ "${takeover}" = 0 ]; then + if [ ! -e "${initramfs}" ]; then + panic "Cannot delete ${initramfs}, doesn't exist." + fi - if ! version_exists "${version}"; then - panic "Cannot delete version ${version}: Not created by this utility." + if ! version_exists "${version}"; then + panic "Cannot delete version ${version}: Not created by this utility." + fi fi altered_check |