diff options
Diffstat (limited to 'zarb-ml/mageia-sysadm/2010-November/000287.html')
-rw-r--r-- | zarb-ml/mageia-sysadm/2010-November/000287.html | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/zarb-ml/mageia-sysadm/2010-November/000287.html b/zarb-ml/mageia-sysadm/2010-November/000287.html new file mode 100644 index 000000000..598c3e291 --- /dev/null +++ b/zarb-ml/mageia-sysadm/2010-November/000287.html @@ -0,0 +1,104 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> +<HTML> + <HEAD> + <TITLE> [Mageia-sysadm] [165] - use mv -f instead of cp + rm ( shorter, cleaner ) + </TITLE> + <LINK REL="Index" HREF="index.html" > + <LINK REL="made" HREF="mailto:mageia-sysadm%40mageia.org?Subject=Re%3A%20%5BMageia-sysadm%5D%20%5B165%5D%20-%20use%20mv%20-f%20instead%20of%20cp%20%2B%20rm%20%28%20shorter%2C%0A%09cleaner%20%29&In-Reply-To=%3C20101105184609.6588B3FBF8%40valstar.mageia.org%3E"> + <META NAME="robots" CONTENT="index,nofollow"> + <META http-equiv="Content-Type" content="text/html; charset=us-ascii"> + <LINK REL="Previous" HREF="000286.html"> + <LINK REL="Next" HREF="000288.html"> + </HEAD> + <BODY BGCOLOR="#ffffff"> + <H1>[Mageia-sysadm] [165] - use mv -f instead of cp + rm ( shorter, cleaner )</H1> + <B>root at mageia.org</B> + <A HREF="mailto:mageia-sysadm%40mageia.org?Subject=Re%3A%20%5BMageia-sysadm%5D%20%5B165%5D%20-%20use%20mv%20-f%20instead%20of%20cp%20%2B%20rm%20%28%20shorter%2C%0A%09cleaner%20%29&In-Reply-To=%3C20101105184609.6588B3FBF8%40valstar.mageia.org%3E" + TITLE="[Mageia-sysadm] [165] - use mv -f instead of cp + rm ( shorter, cleaner )">root at mageia.org + </A><BR> + <I>Fri Nov 5 19:46:09 CET 2010</I> + <P><UL> + <LI>Previous message: <A HREF="000286.html">[Mageia-sysadm] [164] - migrate to the new config file format +</A></li> + <LI>Next message: <A HREF="000288.html">[Mageia-sysadm] [166] - enable reporting, as explained on http://projects.puppetlabs.com/ projects/1/wiki/Reports_And_Reporting +</A></li> + <LI> <B>Messages sorted by:</B> + <a href="date.html#287">[ date ]</a> + <a href="thread.html#287">[ thread ]</a> + <a href="subject.html#287">[ subject ]</a> + <a href="author.html#287">[ author ]</a> + </LI> + </UL> + <HR> +<!--beginarticle--> +<PRE>Revision: 165 +Author: misc +Date: 2010-11-05 19:46:09 +0100 (Fri, 05 Nov 2010) +Log Message: +----------- +- use mv -f instead of cp + rm ( shorter, cleaner ) +- move file creation later rather than creating it and removing it after + +Modified Paths: +-------------- + puppet/modules/blog/templates/check_new-blog-post.sh + +Modified: puppet/modules/blog/templates/check_new-blog-post.sh +=================================================================== +--- puppet/modules/blog/templates/check_new-blog-post.sh 2010-11-05 18:34:23 UTC (rev 164) ++++ puppet/modules/blog/templates/check_new-blog-post.sh 2010-11-05 18:46:09 UTC (rev 165) +@@ -3,16 +3,16 @@ + # Initialization + PATH_TO_FILE="/var/lib/blog" + /usr/bin/wget -qO $PATH_TO_FILE"/RSS_new" <A HREF="http://blog.mageia.org/?feed=rss2">http://blog.mageia.org/?feed=rss2</A> +-/bin/date +"%d:%m:%Y %H:%M" > $PATH_TO_FILE"/last_check" + + # Check if RSS_old exists + if [ ! -f $PATH_TO_FILE"/RSS_old" ] + then +- /bin/cp $PATH_TO_FILE"/RSS_new" $PATH_TO_FILE"/RSS_old" +- /bin/rm -rf $PATH_TO_FILE"/RSS_new" $PATH_TO_FILE"/last_check" ++ /bin/mv -f $PATH_TO_FILE"/RSS_new" $PATH_TO_FILE"/RSS_old" + exit 1 + fi + ++/bin/date +"%d:%m:%Y %H:%M" > $PATH_TO_FILE"/last_check" ++ + # Check if a new blog post on EN needs to be translated on other blogs + tmp_new=$(/bin/grep 'lastBuildDate' $PATH_TO_FILE"/RSS_new") + tmp_old=$(/bin/grep 'lastBuildDate' $PATH_TO_FILE"/RSS_old") +@@ -28,5 +28,4 @@ + fi + + # Clean tmp files and copy RSS_new to RSS_old +-/bin/cp $PATH_TO_FILE"/RSS_new" $PATH_TO_FILE"/RSS_old" +-/bin/rm -rf $PATH_TO_FILE"/RSS_new" ++/bin/mv -f $PATH_TO_FILE"/RSS_new" $PATH_TO_FILE"/RSS_old" +-------------- next part -------------- +An HTML attachment was scrubbed... +URL: </pipermail/mageia-sysadm/attachments/20101105/419db9fc/attachment.html> +</PRE> + + + + +<!--endarticle--> + <HR> + <P><UL> + <!--threads--> + <LI>Previous message: <A HREF="000286.html">[Mageia-sysadm] [164] - migrate to the new config file format +</A></li> + <LI>Next message: <A HREF="000288.html">[Mageia-sysadm] [166] - enable reporting, as explained on http://projects.puppetlabs.com/ projects/1/wiki/Reports_And_Reporting +</A></li> + <LI> <B>Messages sorted by:</B> + <a href="date.html#287">[ date ]</a> + <a href="thread.html#287">[ thread ]</a> + <a href="subject.html#287">[ subject ]</a> + <a href="author.html#287">[ author ]</a> + </LI> + </UL> + +<hr> +<a href="https://www.mageia.org/mailman/listinfo/mageia-sysadm">More information about the Mageia-sysadm +mailing list</a><br> +</body></html> |