diff options
author | Guillem Jover <guillem@hadrons.org> | 2020-09-23 19:56:57 +0200 |
---|---|---|
committer | Guillem Jover <guillem@hadrons.org> | 2020-09-23 20:02:54 +0200 |
commit | b6a0091e4a17dcc01c84dfe233e861fe6e82b1c4 (patch) | |
tree | 8f29be44cd067cb6ccc5107e4fadd1e59d2f6362 | |
parent | bae18059dd61ae42b3c5d7c36b55cb4e49559884 (diff) | |
download | pciutils-b6a0091e4a17dcc01c84dfe233e861fe6e82b1c4.tar.gz |
update-pciids: Make the backup with a hardlink instead of a move
If we move the file while making a backup, we can end up with no
pci.ids database in case the next step fails.
-rwxr-xr-x | update-pciids.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/update-pciids.sh b/update-pciids.sh index 42faeea..3ea4690 100755 --- a/update-pciids.sh +++ b/update-pciids.sh @@ -60,7 +60,7 @@ if ! $GREP >/dev/null "^C " $DEST.neww ; then fi if [ -f $DEST ] ; then - mv $DEST $DEST.old + ln -f $DEST $DEST.old # --reference is supported only by chmod from GNU file, so let's ignore any errors chmod -f --reference=$DEST.old $DEST.neww 2>/dev/null || true fi |