From ca9fbd80291d1f24d98ecb7ece6c2b744075dd8d Mon Sep 17 00:00:00 2001 From: Ward Wouts Date: Wed, 3 Mar 2004 21:18:50 +0000 Subject: [PATCH] 22:13 <@deBeuk> Dwarf: ripnews gaf een melding in mn logs met een verwijzing naar http://procps.sf.net/faq.html 22:14 <@deBeuk> qua ps -aux zou depracated zijn en wat ander cruft --- trunk/ripnews/ripnews.rb | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/trunk/ripnews/ripnews.rb b/trunk/ripnews/ripnews.rb index d616959..8db1172 100755 --- a/trunk/ripnews/ripnews.rb +++ b/trunk/ripnews/ripnews.rb @@ -1,6 +1,6 @@ #!/usr/local/bin/ruby -w -# $Dwarf: ripnews.rb,v 1.77 2003/08/14 15:33:04 ward Exp $ +# $Dwarf: ripnews.rb,v 1.78 2003/09/23 14:43:26 ward Exp $ # $Source$ # @@ -134,6 +134,8 @@ def usage end def parse_config(default = {}) + print "Parsing config\n" + print "#{default[\"-c\"]}\n" if FileTest.readable?("#{default[\"-c\"]}") file = File.new("#{default[\"-c\"]}") lines = file.readlines @@ -262,7 +264,7 @@ def lock lock.close if line line.chomp! - psauxw = `ps -auxw` + psauxw = `ps auxw` if /^\S+\s+#{line}\s+/.match(psauxw) print "Already running, exiting...\n" exit @@ -492,7 +494,7 @@ end ############################################################################################# -$stdout.sync=true # line buffered output +$stdout.sync=true # line buffered output @defaults = {'-c' => "#{ENV['HOME']}/.ripnewsrc"} @defaults = parse_options(@defaults) @config = parse_config(@defaults) @@ -502,14 +504,14 @@ lock renice trap("HUP") { - puts "Rereading config...\n" + print "Rereading config...\n" config = parse_config(@defaults) if config != false @config = config check_config - puts "Done reading config\n" + print "Done reading config\n" else - puts "Keeping old config due to errors\n" + print "Keeping old config due to errors\n" end }