Skip to content
Snippets Groups Projects
Commit 2e850fba authored by Nigel Kukard's avatar Nigel Kukard
Browse files

Coding style fixup

parent 8bbcdf63
No related branches found
No related tags found
No related merge requests found
#!/usr/bin/perl #!/usr/bin/perl
# Main OpenTrafficShaper program # Main OpenTrafficShaper program
# Copyright (C) 2007-2013, AllWorldIT # Copyright (C) 2007-2014, AllWorldIT
# #
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or # the Free Software Foundation, either version 3 of the License, or
...@@ -76,7 +76,7 @@ exit; ...@@ -76,7 +76,7 @@ exit;
# Function to display banner # Function to display banner
sub displayBanner sub displayBanner
{ {
$logger->log(LOG_NOTICE,"[MAIN] OpenTrafficShaper v".VERSION." - Copyright (c) 2007-2013, AllWorldIT"); $logger->log(LOG_NOTICE,"[MAIN] OpenTrafficShaper v%s - Copyright (c) 2007-2014, AllWorldIT",VERSION);
} }
...@@ -232,7 +232,7 @@ sub init ...@@ -232,7 +232,7 @@ sub init
plugin_register($pluginName,0); plugin_register($pluginName,0);
} }
$logger->log(LOG_INFO,"[MAIN] Plugins initialized."); $logger->log(LOG_INFO,"[MAIN] Plugins initialized");
} }
# Function to start things up # Function to start things up
...@@ -266,7 +266,7 @@ sub daemonize { ...@@ -266,7 +266,7 @@ sub daemonize {
open STDOUT, '> /dev/null' open STDOUT, '> /dev/null'
or die "Can't open stdout log: $!"; or die "Can't open stdout log: $!";
defined(my $pid = fork) defined(my $pid = fork)
or die "Can't fork: $!"; or die "Can't fork: $!";
exit if $pid; exit if $pid;
...@@ -277,7 +277,7 @@ sub daemonize { ...@@ -277,7 +277,7 @@ sub daemonize {
print(FH $$); print(FH $$);
close(FH); close(FH);
} else { } else {
$logger->log(LOG_WARN,"[MAIN] Unable to write PID to '".$globals->{'config'}->{'pid_file'}."': $!"); $logger->log(LOG_WARN,"[MAIN] Unable to write PID to '%s': %s",$globals->{'config'}->{'pid_file'},$!);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment