]> mj.ucw.cz Git - pciutils.git/commitdiff
update-pciids should preserve permissions
authorMartin Mares <mj@ucw.cz>
Sat, 27 Dec 2003 00:33:56 +0000 (00:33 +0000)
committerMartin Mares <mj@ucw.cz>
Fri, 5 May 2006 12:18:13 +0000 (14:18 +0200)
* 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
update-pciids.sh

index a09efc4afd57315c88a1ccbc5f35f8561d744931..baef1df9f88984357c7a83f07140fc3cc14fbf3b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2003-12-27  Martin Mares  <mj@ucw.cz>
 
+       * 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.
 
index d3c0b1f3a617c9ce2f2feaacc23e024571b4b3b0..ea89610ffcca88e1f6eb2338e7fd6ed0546d5f5f 100755 (executable)
@@ -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