diff options
| author | Stoiko Ivanov <s.ivanov@proxmox.com> | 2024-11-20 15:13:34 +0100 | 
|---|---|---|
| committer | Thomas Lamprecht <t.lamprecht@proxmox.com> | 2024-11-20 16:13:38 +0100 | 
| commit | c1a9ab4b878fbdabba8ca605e9e2ffbe53d9eada (patch) | |
| tree | 411f454c91d91112f7f6fa093ca0ce68036765c6 | |
| parent | 3b2e57499e74d85fd2b0627ff9fab769d3bfb4e5 (diff) | |
d/postinst: do not break, if ipam-file moves fail
failing a package-install does not help repairing the situation - so
inform the user about the issue instead of erroring out. The copy
could fail if a node is not quorate, so writes in /etc/pve are a bit
more likely to fail
adapts the change introduced in
d0628df ("debian: migrate legacy mac/ipam cache/state files")
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
| -rw-r--r-- | debian/libpve-network-perl.postinst | 4 | 
1 files changed, 2 insertions, 2 deletions
diff --git a/debian/libpve-network-perl.postinst b/debian/libpve-network-perl.postinst index c28328d..99faedf 100644 --- a/debian/libpve-network-perl.postinst +++ b/debian/libpve-network-perl.postinst @@ -8,7 +8,7 @@ migrate_ipam_db() {    if test -f "$LEGACY_IPAM_DB_FILE" && test ! -f "$IPAM_DB_FILE"; then      echo "copying over existing legacy IPAM state file to new path..." -    cp $LEGACY_IPAM_DB_FILE $IPAM_DB_FILE +    cp $LEGACY_IPAM_DB_FILE $IPAM_DB_FILE || echo "copying IPAM state file failed!"    fi  } @@ -18,7 +18,7 @@ migrate_mac_cache() {    if test -f "$LEGACY_MAC_DB_FILE" && test ! -f "$MAC_DB_FILE"; then      echo "copying over existing legacy IPAM MAC-map cache file to new path..." -    cp $LEGACY_MAC_DB_FILE $MAC_DB_FILE +    cp $LEGACY_MAC_DB_FILE $MAC_DB_FILE || echo "copying IPAM MAC-map cache file failed!"    fi  }  | 
