fixed create_sysop so that the it has the correct BEGIN sequence, which will
[spider.git] / perl / create_sysop.pl
index a08bb9fffc441bcebdacf7d438ceb805b9de5daa..1e553209d9045dacc65d7b2712cc0e83e2182428 100755 (executable)
@@ -9,6 +9,16 @@
 # $Id$
 # 
 
+# make sure that modules are searched in the order local then perl
+BEGIN {
+  # root of directory tree for this system
+  $root = "/spider"; 
+  $root = $ENV{'DXSPIDER_ROOT'} if $ENV{'DXSPIDER_ROOT'};
+
+  unshift @INC, "$root/perl";  # this IS the right way round!
+  unshift @INC, "$root/local";
+}
+
 use DXVars;
 use DXUser;
 
@@ -28,6 +38,8 @@ sub create_it
   $self->{sort} = 'U';           # C - Console user, S - Spider cluster, A - AK1A, U - User, B - BBS
   $self->{priv} = 9;             # 0 - 9 - with 9 being the highest
   $self->{lastin} = 0;
+  $self->{dxok} = 1;
+  $self->{annok} = 1;
 
   # write it away
   $self->close();
@@ -44,6 +56,8 @@ sub create_it
   $self->{sort} = 'U';           # C - Console user, S - Spider cluster, A - AK1A, U - User, B - BBS
   $self->{priv} = 9;             # 0 - 9 - with 9 being the highest
   $self->{lastin} = 0;
+  $self->{dxok} = 1;
+  $self->{annok} = 1;
 
   # write it away
   $self->close();