forked from tildeverse/uucp
added initial bootstrap script for new Tier 1 nodes
This commit is contained in:
parent
8a10364fcc
commit
ed33496ea9
16
etc/config
16
etc/config
|
@ -1,16 +0,0 @@
|
||||||
#
|
|
||||||
# config This is the configuration file for uucp. Most configurable
|
|
||||||
# things are commented out as they are the default (compiled
|
|
||||||
# in) setting. The only thing you might want to change is the
|
|
||||||
# "nodename". That's your UUCP system name - change it if it's
|
|
||||||
# different from your normal hostname.
|
|
||||||
#
|
|
||||||
|
|
||||||
nodename <nodename>
|
|
||||||
|
|
||||||
# Defaults.
|
|
||||||
#sysfile /etc/uucp/sys
|
|
||||||
#portfile /etc/uucp/port
|
|
||||||
#dialfile /etc/uucp/dial
|
|
||||||
#callfile /etc/uucp/call
|
|
||||||
#passwdfile /etc/uucp/passwd
|
|
29
etc/port
29
etc/port
|
@ -1,29 +0,0 @@
|
||||||
#
|
|
||||||
# port This file defines the possible dialout ports you have
|
|
||||||
# on your system. Normally you have only one, and it's
|
|
||||||
# most probably /dev/ttyS[0-3]. Define that port here.
|
|
||||||
#
|
|
||||||
# If you have multiple dialout ports, you can ofcourse
|
|
||||||
# define them all if you want.
|
|
||||||
#
|
|
||||||
port ACU
|
|
||||||
type modem
|
|
||||||
#
|
|
||||||
# NOTE: Make SURE this device is owned by root:dialout, mode 0660 (crw-rw---)
|
|
||||||
#
|
|
||||||
device /dev/ttyS3
|
|
||||||
dialer hayes
|
|
||||||
speed 57600
|
|
||||||
|
|
||||||
#
|
|
||||||
# Description for the TCP port - pretty trivial. DON'T DELETE.
|
|
||||||
#
|
|
||||||
port TCP
|
|
||||||
type tcp
|
|
||||||
|
|
||||||
port Dataforge
|
|
||||||
type pipe
|
|
||||||
command /usr/bin/ssh -a -x -q -i /var/spool/uucp/ssh/id_rsa -l uucp uucp.dataforge.tk
|
|
||||||
reliable true
|
|
||||||
protocol etyig
|
|
||||||
|
|
13
etc/sys
13
etc/sys
|
@ -1,13 +0,0 @@
|
||||||
system dataforge
|
|
||||||
call-login U
|
|
||||||
call-password Y2VudGVyOmRhdGFmb3JnZQ===
|
|
||||||
local-send /
|
|
||||||
local-receive /var/spool/uucppublic
|
|
||||||
remote-send /
|
|
||||||
remote-receive /var/spool/uucppublic
|
|
||||||
time any
|
|
||||||
forward ANY
|
|
||||||
chat "" \d\d\r\c login: \d\L word: \P
|
|
||||||
chat-timeout 60
|
|
||||||
protocol t
|
|
||||||
port Dataforge
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
tildeteam,tilde.team
|
||||||
|
cosmic,cosmic.voyage
|
||||||
|
center,tilde.center
|
||||||
|
dataforge,uucp.dataforge.tk
|
|
@ -0,0 +1,82 @@
|
||||||
|
#!/usr/bin/perl
|
||||||
|
#
|
||||||
|
use warnings;
|
||||||
|
use strict;
|
||||||
|
|
||||||
|
my $nodename = $ARGV[0];
|
||||||
|
|
||||||
|
sub getNodes {
|
||||||
|
my $nodelist = "../nodelist";
|
||||||
|
|
||||||
|
open(my $data, '<', $nodelist);
|
||||||
|
|
||||||
|
print("Generating files\n");
|
||||||
|
while (my $line = <$data>) {
|
||||||
|
chomp $line;
|
||||||
|
|
||||||
|
my @fields = split(",", $line);
|
||||||
|
my $nodeName = $fields[0];
|
||||||
|
my $nodeAddress = $fields[1];
|
||||||
|
generatePort($nodeName,$nodeAddress);
|
||||||
|
generateSys($nodeName);
|
||||||
|
print("System ".$nodeName." added successfully\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
print("UUCP bootstrapping complete. Please copy sys and port configuration files to /etc/uucp\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
sub generatePort {
|
||||||
|
|
||||||
|
my $currentNode = shift;
|
||||||
|
my $nodeAddress = shift;
|
||||||
|
|
||||||
|
$currentNode =~ s/^([a-z])/\U$1/;
|
||||||
|
|
||||||
|
my $template = qq{
|
||||||
|
port $currentNode
|
||||||
|
type pipe
|
||||||
|
command /usr/bin/ssh -a -x -q -i /var/spool/uucp/.ssh/id_rsa -l uucp $nodeAddress
|
||||||
|
reliable true
|
||||||
|
protocol etyig
|
||||||
|
};
|
||||||
|
|
||||||
|
my $portFile = "port";
|
||||||
|
open(FH, '>>', $portFile);
|
||||||
|
print FH $template;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
sub generateSys {
|
||||||
|
my $nodeName = shift;
|
||||||
|
|
||||||
|
my $template = qq{
|
||||||
|
system $nodeName
|
||||||
|
call-login *
|
||||||
|
call-password *
|
||||||
|
local-send /
|
||||||
|
local-receive /var/spool/uucppublic
|
||||||
|
remote-send /
|
||||||
|
remote-receive /var/spool/uucppublic
|
||||||
|
time any
|
||||||
|
forward ANY
|
||||||
|
chat \"\" \\d\\d\\r\\c login: \\d\\L word: \\P
|
||||||
|
chat-timeout 60
|
||||||
|
protocol t
|
||||||
|
port Center
|
||||||
|
};
|
||||||
|
|
||||||
|
my $sysFile = "sys";
|
||||||
|
|
||||||
|
open(FH, '>>', $sysFile);
|
||||||
|
print FH $template;
|
||||||
|
};
|
||||||
|
|
||||||
|
sub generatePasswd {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
sub generateConfig {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
getNodes()
|
Loading…
Reference in New Issue