On 01/14/2013 04:47 PM, Jakub Filak wrote:
- realted to trac#927
+CopyVMcore=`sed -n '/^CopyVMcore[ \t]*=/ s/.*=[ \t]*//p'
@CONF_DIR(a)/abrt-harvest-vmcore.conf 2>/dev/null`
+ABRTDumpDir=`sed -n '/^DumpLocation [ \t]*=/ s/.*=[ \t]*//p'
@CONF_DIR(a)/abrt.conf 2>/dev/null`
This will not catch "DumpLocation=DIR" (without space before "=")
+ cp -r --no-preserve=all -- "$d"
"$ABRTDumpDir/vmcore-$d.new" || {
+ rm -rf "$ABRTDumpDir/vmcore-$d.new"
Just like in cp, in rm you also are better off using "--"
to not misinterpret "$ABRTDumpDir" which starts with a dash
as options. IOW:
rm -rf -- "$ABRTDumpDir/vmcore-$d.new"
+ chown -R 0:0 "$ABRTDumpDir/vmcore-$d.new"
+ chmod -R u+rwX,go-rwxst "$ABRTDumpDir/vmcore-$d.new"
+ mv "$ABRTDumpDir/vmcore-$d.new" "$ABRTDumpDir/vmcore-$d"
Here too.
--
vda