From 80b3121adfc9560880e5971788589f7338579b0f Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sat, 27 Dec 2003 00:33:56 +0000 Subject: [PATCH] update-pciids should preserve permissions * update-pciids.sh: Try to preserve permissions of the old file if chmod supports --reference. Should close Debian Bug #223740. git-archimport-id: mj@ucw.cz--public/pciutils--main--2.2--patch-24 --- ChangeLog | 3 +++ update-pciids.sh | 2 ++ 2 files changed, 5 insertions(+) diff --git a/ChangeLog b/ChangeLog index a09efc4..baef1df 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2003-12-27 Martin Mares + * update-pciids.sh: Try to preserve permissions of the old file + if chmod supports --reference. Should close Debian Bug #223740. + * lib/proc.c (proc_setup): Increased path name length limit to 1024. Thanks for Redhat and Mandrake for inspiration. diff --git a/update-pciids.sh b/update-pciids.sh index d3c0b1f..ea89610 100755 --- a/update-pciids.sh +++ b/update-pciids.sh @@ -41,6 +41,8 @@ fi if [ -f $DEST ] ; then mv $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 mv $DEST.neww $DEST rm $DEST.new -- 2.39.2