Various miscellaneous script and code tweaks.
This commit is contained in:
parent
06978b3cc4
commit
cac8c6bda0
5 changed files with 92 additions and 5 deletions
|
@ -34,7 +34,7 @@ else
|
|||
WORK_BASE="${BASE_DIR}/Work"
|
||||
CLIENT_LIST_RUDE="${WORK_BASE}/clients.rude"
|
||||
CLIENT_LIST_NICE="${WORK_BASE}/clients.nice"
|
||||
OUTPUT_DIR="${BASE_DIR}/Scenery-0.9.5"
|
||||
OUTPUT_DIR="${BASE_DIR}/Scenery-0.9.6"
|
||||
LOG_DIR="${WORK_BASE}/Status"
|
||||
SERVER_LOG_FILE=${LOG_DIR}/server.log
|
||||
echo "Base directory is $BASE_DIR"
|
||||
|
|
|
@ -33,7 +33,7 @@ else
|
|||
BASE_DIR=$1
|
||||
shift
|
||||
WORK_BASE="${BASE_DIR}/Work"
|
||||
OUTPUT_DIR="${BASE_DIR}/Scenery-0.9.5"
|
||||
OUTPUT_DIR="${BASE_DIR}/Scenery-0.9.6"
|
||||
MASTER_ON="${WORK_BASE}/Status/MASTER_ON"
|
||||
LOG_DIR="${WORK_BASE}/Status"
|
||||
LOG_FILE="${LOG_DIR}/server.log"
|
||||
|
|
84
src/Prep/Tower/telnet.pl
Normal file
84
src/Prep/Tower/telnet.pl
Normal file
|
@ -0,0 +1,84 @@
|
|||
#!/usr/bin/perl
|
||||
#
|
||||
# Written by Curtis L. Olson, started December 2002
|
||||
# Some code portions courtesy of Melchior FRANZ
|
||||
#
|
||||
# This file is in the Public Domain and comes with no warranty.
|
||||
#
|
||||
# $Id$
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
|
||||
use IO::Socket;
|
||||
|
||||
use strict;
|
||||
|
||||
|
||||
sub my_not() {
|
||||
my( $val ) = shift;
|
||||
|
||||
if ( $val eq "true" ) {
|
||||
return 0;
|
||||
} elsif ( $val eq "false" ) {
|
||||
return 1;
|
||||
} elsif ( $val eq "" ) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sub get_prop() {
|
||||
my( $handle ) = shift;
|
||||
|
||||
&send( $handle, "get " . shift );
|
||||
eof $handle and die "\nconnection closed by host";
|
||||
$_ = <$handle>;
|
||||
s/\015?\012$//;
|
||||
/^-ERR (.*)/ and die "\nfgfs error: $1\n";
|
||||
|
||||
return $_;
|
||||
}
|
||||
|
||||
|
||||
sub set_prop() {
|
||||
my( $handle ) = shift;
|
||||
my( $prop ) = shift;
|
||||
my( $value ) = shift;
|
||||
|
||||
&send( $handle, "set $prop $value");
|
||||
|
||||
# eof $handle and die "\nconnection closed by host";
|
||||
}
|
||||
|
||||
|
||||
sub send() {
|
||||
my( $handle ) = shift;
|
||||
|
||||
print $handle shift, "\015\012";
|
||||
}
|
||||
|
||||
|
||||
sub connect() {
|
||||
my( $host ) = shift;
|
||||
my( $port ) = shift;
|
||||
my( $timeout ) = (shift || 120);
|
||||
my( $socket );
|
||||
STDOUT->autoflush(1);
|
||||
while ($timeout--) {
|
||||
if ($socket = IO::Socket::INET->new( Proto => 'tcp',
|
||||
PeerAddr => $host,
|
||||
PeerPort => $port) )
|
||||
{
|
||||
$socket->autoflush(1);
|
||||
return $socket;
|
||||
}
|
||||
print "Attempting to connect to $host ... " . $timeout . "\n";
|
||||
sleep(1);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
return 1; # make perl happy
|
|
@ -4,7 +4,7 @@ $tgzdir = "/stage/fgfs03/curt/Scenery/Scenery-0.9.5";
|
|||
$verbose = 0;
|
||||
|
||||
if ( $#ARGV < 0 ) {
|
||||
die "usage: $0 <disk_size_mb>\n";
|
||||
die "usage: $0 <disk_size_mb> (DVD=4500, CDROM=700)\n";
|
||||
} else {
|
||||
$disksize = shift(@ARGV);
|
||||
}
|
||||
|
|
|
@ -1,18 +1,21 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [ "x${1}" == "x" ]; then
|
||||
if [ "x${2}" == "x" ]; then
|
||||
echo "cd one level above the source directory and specify it's short name"
|
||||
echo "as arg $1"
|
||||
echo
|
||||
echo "usage: $0 <source_dir> <dest_dir>"
|
||||
exit
|
||||
fi
|
||||
|
||||
VERSION=0.9.5
|
||||
SOURCE=$1
|
||||
DEST=$2
|
||||
VOLUME_ID=FG_Scenery_${SOURCE}_v${VERSION}
|
||||
PUBLISHER=curt@flightgear.org
|
||||
PREPAIRER=curt@flightgear.org
|
||||
# COPYRIGHT="Copyright (C) 2002 Curtis L. Olson"
|
||||
OUTPUT_IMG=/data1/images/${SOURCE}-${VERSION}.img
|
||||
OUTPUT_IMG=${2}/${SOURCE}-${VERSION}.img
|
||||
|
||||
# -f = follow symbolic links (the image directories are link trees)
|
||||
# -r = Rock Ridge protocol
|
||||
|
|
Loading…
Reference in a new issue