From: Martin Mares Date: Sat, 27 Dec 2003 00:33:56 +0000 (+0000) Subject: update-pciids should preserve permissions X-Git-Tag: v3.0.0~141 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=80b3121adfc9560880e5971788589f7338579b0f;p=pciutils.git 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 --- 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