public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
From: Matthias Fischer <matthias.fischer@ipfire.org>
To: development@lists.ipfire.org
Subject: Re: Betatest Guardian 2.0
Date: Sat, 30 Jul 2016 21:06:19 +0200	[thread overview]
Message-ID: <1cb4edb1-4047-afb3-fb27-9d09a133fc76@ipfire.org> (raw)
In-Reply-To: <1469729150.15771.9.camel@ipfire.org>

[-- Attachment #1: Type: text/plain, Size: 220 bytes --]

Hi,

I found some typos in '/usr/sbin/guardian'.

Didn't know how to do this better, so I'm sending an *attached* patch.

In the meantime, 'guardian' is running without seen problems - great
work! ;-)

Best,
Matthias




[-- Attachment #2: _usr_sbin_guardian_typos.patch --]
[-- Type: text/plain, Size: 6558 bytes --]

--- old/guardian	Thu Jul 28 19:27:22 2016
+++ new/guardian	Sat Jul 30 20:54:29 2016
@@ -37,7 +37,7 @@
 
 use warnings;
 
-# Disable warnings of unjoinded threads when stopping guardian.
+# Disable warnings of unjoined threads when stopping guardian.
 no warnings 'threads';
 
 # Define version.
@@ -58,7 +58,7 @@
 	print "Guardian $version \n";
 	print "Usage: guardian <optional arguments>\n";
 	print " -c, --config\t\tspecifiy a configuration file other than the default (/etc/guardian/guardian.conf)\n";
-	print " -f, --foreground\trun in the foreground (doesn't fork, any output goes to STDOUT)\n";
+	print " -f, --foreground\turn in the foreground (doesn't fork, any output goes to STDOUT)\n";
 	print " -h, --help\t\tshows this help\n";
 	print " -v, --version\t\tdisplay programm version and exit.\n";
 	exit;
@@ -69,7 +69,7 @@
 
 # Check if another instance of guardian is allready running.
 if (&Guardian::Daemon::IsRunning()) {
-	die "Another instance of Guardian is allready running...\n";
+	die "Another instance of Guardian is already running...\n";
 }
 
 # Read-in the configuration file and store the settings.
@@ -183,18 +183,18 @@
 ## with huge logfiles, at initialization time of the worker process, the file will
 ## be opened once and the cursor position of the end of file (EOF) get stored. When
 ## reading any newly added lines from the file, we directly can jump to the last
-## known position and get these lines. Afterwards, we store the current curser position
+## known position and get these lines. Afterwards, we store the current cursor position
 ## again, so we can do it in this way over and over again.
 #
 ## All read lines get stored in an array, which will be passed to the Parser.
 #
-## If any response (action) from the parser get recieved, it will be put into the
+## If any response (action) from the parser is received, it will be put into the
 ## shared event queue.
 #
 sub Worker ($) {
 	my $file = $_[0];
 
-	# Obtain the parser name which should be used to parser any
+	# Obtain the parser name which should be used to parse any
 	# messages of this file.
 	my $parser = $monitored_files{$file};
 
@@ -215,7 +215,7 @@
 
 	# Infinite loop.
 	while(1) {
-		# Check if the workers should pause or perform it's desired work.
+		# Check if the workers should pause or perform their desired work.
 		if ($workers_pause) {
 			# Wait 1 second until the next check.
 			sleep(1);
@@ -286,7 +286,7 @@
 ## Socket function.
 #
 ## This function uses the Socket module to create and listen to an UNIX socket.
-## It automatically accepts all incomming connections and pass the recieved
+## It automatically accepts all incoming connections and pass the received
 ## data messages to the the Message_Parser function which is also part of the
 ## socket module.
 #
@@ -300,10 +300,10 @@
 	# Log successfull creation of socket.
 	$logger->Log("debug", "Listening to Socket...");
 
-        # Accept incomming connections from the socket.
+        # Accept incoming connections from the socket.
         while (my $connection = $server->accept()) {
 		# Autoflush the socket after the data
-		# has been recieved.
+		# has been received.
 		$connection->autoflush(1);
 
 		# Gather all data from the connection.
@@ -311,10 +311,10 @@
 			# Remove any newlines.
 			chomp($message);
 
-			# Log recieved socket command.
+			# Log received socket command.
 			$logger->Log("debug", "Socket - Recieved message: $message");
 
-			# Send the recieved data message to the
+			# Send the received data message to the
 			# socket parser.
 			my $action = &Guardian::Socket::Message_Parser($message);
 
@@ -335,7 +335,7 @@
 ## Function for capturing process signals.
 #
 ## This function captures any sent process signals and will call various
-## actions, basend on the captured signal.
+## actions, based on the captured signal.
 #
 sub SignalHandler {
 	$SIG{INT} = \&Shutdown;
@@ -359,7 +359,7 @@
 	# Loop through the hash which contains the monitored files and start
 	# a worker thread for each single one.
 	foreach my $file (keys %monitored_files) {
-		# Check if an worker allready is running for this file.
+		# Check if an worker is already running for this file.
 		# If not, start the worker.
 		unless (exists($running_workers{$file})) {
 			$logger->Log("debug", "Starting worker thread for $file");
@@ -380,7 +380,7 @@
 	# Loop through all running workers.
 	foreach my $worker (keys %running_workers) {
 		# Determine if the worker should be stopped.
-		# This happen if the file should not be longer monitored.
+		# This happens if the file should not be longer monitored.
 		unless(exists($monitored_files{$worker})) {
 			$logger->Log("debug", "Stopping worker thread for $worker");
 
@@ -408,7 +408,7 @@
 #
 sub PauseWorkers() {
 	# Set workers_pause variable to "1".
-	# All workers will be sleep until the variable has been set to "0".
+	# All workers will sleep until the variable has been set to "0".
 	$workers_pause = 1;
 
 	# Log paused workers.
@@ -438,7 +438,7 @@
 #
 ## Reload function.
 #
-## This function will get called if the signal handler recieves a "SIGHUP" signal,
+## This function will get called if the signal handler receives a "SIGHUP" signal,
 ## or the reload command will be sent via socket connection. It is responsible for
 ## reloading all configure options and stopping/starting the worker threads.
 #
@@ -483,7 +483,7 @@
 #
 ## ReloadIgnoreList function.
 #
-## This function will be called if the signal handler recieves a "SIGUSR1" signal,
+## This function will be called if the signal handler receives a "SIGUSR1" signal,
 ## or the reload-ignore-list command will be sent via the socket connection. It just
 ## performs a simple check if an ignore file has been configured and calls the responsible
 ## function on the events module.
@@ -504,7 +504,7 @@
 #
 ## This function only get called when the logrotate command will be sent via
 ## the socket connection. It is responsible for validating and altering the current
-## curser positions of the monitored files and stopping/starting the worker threads.
+## cursor positions of the monitored files and stopping/starting the worker threads.
 #
 sub Logrotate () {
 	# Stop all running workers.
@@ -549,7 +549,7 @@
 ## Shutdown function.
 #
 ## This function is used to do a clean shutdown of guardian. It will be called
-## by the signal handler when recieving INT (2), QUIT (3) and TERM (15) signals.
+## by the signal handler when receiving INT (2), QUIT (3) and TERM (15) signals.
 #
 sub Shutdown () {
 	# Log shutdown.

  parent reply	other threads:[~2016-07-30 19:06 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-18 14:01 Stefan Schantl
2016-07-19  7:14 ` Daniel Weismüller
2016-07-19 10:01   ` Stefan Schantl
2016-07-20 13:37     ` Stefan Schantl
2016-07-20 13:33 ` Stefan Schantl
2016-07-20 14:28   ` Matthias Fischer
2016-07-21 11:25   ` Matthias Fischer
2016-07-21 11:28     ` Michael Tremer
2016-07-21 13:07       ` Matthias Fischer
2016-07-21 15:57       ` Matthias Fischer
2016-07-21 19:05     ` Flying Trashcan
2016-07-21 19:52     ` Flying Trashcan
2016-07-21 21:07       ` Matthias Fischer
2016-07-22 20:28         ` Matthias Fischer
2016-07-22 22:23           ` Matthias Fischer
2016-07-26 15:10             ` Michael Tremer
2016-07-26 18:31               ` Matthias Fischer
2016-07-28 17:41                 ` Stefan Schantl
2016-07-28 10:47               ` Stefan Schantl
2016-07-28 18:05                 ` Stefan Schantl
2016-07-29 16:20                   ` Matthias Fischer
2016-07-30 19:06                   ` Matthias Fischer [this message]
     [not found] <1468920284.13947.5.camel@ipfire.org>
2016-07-19 12:54 ` Matthias Fischer
2016-07-19 17:26   ` Stefan Schantl
2016-07-19 18:01     ` Matthias Fischer
     [not found] <8916bfc3-2af6-af48-992b-b014d51a405a@ipfire.org>
2016-08-06 19:39 ` Michael Tremer
2016-08-06 22:41 ` Matthias Fischer
2016-08-24 12:36   ` Daniel Weismüller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1cb4edb1-4047-afb3-fb27-9d09a133fc76@ipfire.org \
    --to=matthias.fischer@ipfire.org \
    --cc=development@lists.ipfire.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox