[Fai-commit] r5309 - in trunk: bin debian
Thomas Lange
lange at alioth.debian.org
Thu Apr 9 13:29:33 UTC 2009
Author: lange
Date: 2009-04-09 13:29:32 +0000 (Thu, 09 Apr 2009)
New Revision: 5309
Modified:
trunk/bin/faimond
trunk/debian/changelog
Log:
bin/faimond: Try to load Proc::Daemon only in case -d is given; if it
fails, print a helpful error message (closes: #513090)
Modified: trunk/bin/faimond
===================================================================
--- trunk/bin/faimond 2009-04-09 13:27:13 UTC (rev 5308)
+++ trunk/bin/faimond 2009-04-09 13:29:32 UTC (rev 5309)
@@ -15,7 +15,6 @@
use strict;
use Socket;
use Getopt::Std;
-use Proc::Daemon;
$| = 1;
my ($port, $timeout, $daemon, $timestamp);
@@ -78,7 +77,7 @@
}
close(PIDFILE);
}
- Proc::Daemon::Init;
+ eval "Proc::Daemon::Init";
umask 022;
open(PIDFILE, '>', "$pidfile") or die "open $pidfile: $!";
@@ -177,6 +176,8 @@
}
if (defined($opt_d)) {
+ (eval "require Proc::Daemon") or
+ die "Daemon mode not available, Proc::Daemon not found. Please install libproc-daemon-perl\n";
# If in daemon mode, use standard daemon log file
$logfile = $daemonlogfile;
}
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2009-04-09 13:27:13 UTC (rev 5308)
+++ trunk/debian/changelog 2009-04-09 13:29:32 UTC (rev 5309)
@@ -14,6 +14,8 @@
(thanks Alexander Fisher) (closes: #441436)
* bin/fai-setup: Do not unconditionally add $FAI_CONFIGDIR to exports(5)
(thanks Sebastian Harl) (closes: #504801)
+ * bin/faimond: Try to load Proc::Daemon only in case -d is given; if it
+ fails, print a helpful error message (closes: #513090)
[ Michael Tautschnig ]
* setup-storage: Bumped version number to 1.0.4
More information about the Fai-commit
mailing list