File aaa_base-pre_post-bug-1038549.patch of Package aaa_base.4819
--- aaa_base-13.2+git20140911.61c1681/aaa_base.pre 2018/02/16 14:23:23 1.1
+++ aaa_base-13.2+git20140911.61c1681/aaa_base.pre 2018/02/16 14:24:21
@@ -107,7 +107,9 @@
# fix permissions if this script is called with strange umask
chmod 644 /etc/$file
else
- cat /var/adm/fillup-templates/$file.aaa_base > /etc/$file
+ rm -f /etc/$file.tmp
+ cp /var/adm/fillup-templates/$file.aaa_base /etc/$file.tmp
+ mv -f /etc/$file.tmp /etc/$file
fi
done
--- aaa_base-13.2+git20140911.61c1681/aaa_base.post 2018/02/16 14:20:21 1.1
+++ aaa_base-13.2+git20140911.61c1681/aaa_base.post 2018/02/16 14:23:19
@@ -131,10 +131,12 @@
# If we have a NIS system, we have to make sure, that "^+" is at the end
grep -v "^+" /etc/$i > /etc/$i.tmp || :
grep "^+" /etc/$i >> /etc/$i.tmp || :
- test -s /etc/$i.tmp && cat /etc/$i.tmp > /etc/$i
+ test -s /etc/$i.tmp && mv -f /etc/$i.tmp /etc/$i
rm -f /etc/$i.tmp
else
- cat /var/adm/fillup-templates/$i.aaa_base > /etc/$i
+ rm -f /etc/$i.tmp
+ cp /var/adm/fillup-templates/$i.aaa_base /etc/$i.tmp
+ mv -f /etc/$i.tmp /etc/$i
echo "new"
fi
done