projects
/
spider.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
500bf82
)
put some basic validation into startup to check that things are there!
author
minima
<minima>
Sun, 27 Jan 2002 16:00:57 +0000
(16:00 +0000)
committer
minima
<minima>
Sun, 27 Jan 2002 16:00:57 +0000
(16:00 +0000)
perl/cluster.pl
patch
|
blob
|
history
diff --git
a/perl/cluster.pl
b/perl/cluster.pl
index d108a560c3187871f370b6615afad51bab761ce4..59ff51782a9a5f5b06bef219ec871a28ab8b9f85 100755
(executable)
--- a/
perl/cluster.pl
+++ b/
perl/cluster.pl
@@
-23,6
+23,14
@@
BEGIN {
unshift @INC, "$root/perl"; # this IS the right way round!
unshift @INC, "$root/local";
unshift @INC, "$root/perl"; # this IS the right way round!
unshift @INC, "$root/local";
+ # do some validation of the input
+ die "The directory $root doesn't exist, please RTFM" unless -d $root;
+ die "$root/local doesn't exist, please RTFM" unless -d "$root/local";
+ die "$root/local/DXVars doesn't exist, please RTFM" unless -e "$root/local/DXVars.pm";
+
+ mkdir "$root/local_cmd" unless -e "$root/local_cmd";
+
+
# try to create and lock a lockfile (this isn't atomic but
# should do for now
$lockfn = "$root/perl/cluster.lck"; # lock file name
# try to create and lock a lockfile (this isn't atomic but
# should do for now
$lockfn = "$root/perl/cluster.lck"; # lock file name
@@
-382,6
+390,14
@@
Bands::load();
dbg("loading user file system ...");
DXUser->init($userfn, 1);
dbg("loading user file system ...");
DXUser->init($userfn, 1);
+# look for the sysop and the alias user and complain if they aren't there
+{
+ my $ref = DXUser->get($mycall);
+ die "$mycall missing, run the create_sysop.pl script and please RTFM" unless $ref && $ref->priv == 9;
+ $ref = DXUser->get($myalias);
+ die "$myalias missing, run the create_sysop.pl script and please RTFM" unless $ref && $ref->priv == 9;
+}
+
# start listening for incoming messages/connects
dbg("starting listeners ...");
my $conn = IntMsg->new_server($clusteraddr, $clusterport, \&login);
# start listening for incoming messages/connects
dbg("starting listeners ...");
my $conn = IntMsg->new_server($clusteraddr, $clusterport, \&login);