+Backup all the config files to -orig.
# $Id$
set -ex
-for base in "$@";do
+l="$*"
+[ -z "$l" ] && l="$(rpm -qla|perl -lne 'chomp;s/$/.rpmnew/;print if -f;')"
+for base in $l;do
base=`echo $base|sed 's/[.]rpmnew$//'`
test -f $base
test -f $base.rpmnew
rm -f $base.rej
exit 1
done
+
+rpm -qac|perl -ne 'chomp;next if $_ eq "(contains no files)";next if m{^/var/lib/rpm/};next if ! -f $_;$o="$_-orig";next if -e $o;system "cp -i -p '\''$_'\'' '\''$o'\''" and die "$_: $!";'
+
echo OK