#!/opt/bin/perl

$_="SkyNET Online - For more information login as 'guest' at the prompt.
                To report a problem, login as 'trouble'.
                You are connected to a USR modem.";

s/\n/\^/g; $usrmsg=$_;


$_="SkyNET Online - For more information login as 'guest' at the prompt.
                To report a problem, login as 'trouble'.
                You are connected to a Cardinal modem.";

s/\n/\^/g; $cardmsg=$_;

system("echo \"set all message $usrmsg\" | pmcommand ts-4");


open (F,"|pmcommand ts-3") || die "cant run pmcommand ts-3";
for (1..10) {
    print F "set S$_ message $usrmsg\n";
}
close F;

foreach("ts-2","ts-5") {
    system("echo \"set all message $cardmsg\" | pmcommand $_");
}
