From: Andre Noll Date: Sun, 5 Feb 2012 13:39:37 +0000 (+0100) Subject: Fix t0004-server. X-Git-Tag: v0.4.10~5^2 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=fe52b27f0d88350f0a2efa5bafd11970a577dfca;p=paraslash.git Fix t0004-server. Currently we try to generate an ssh key and start para_server even if the ssh-keygen executable was not found or para_server was not built. Fix this by starting para_server only of both executables exist. --- diff --git a/t/t0004-server.sh b/t/t0004-server.sh index c79ea24b..3c878eb7 100755 --- a/t/t0004-server.sh +++ b/t/t0004-server.sh @@ -57,30 +57,33 @@ missing_objects="$result" test_require_executables "ssh-keygen" missing_executables="$result" -ssh-keygen -q -t rsa -b 2048 -N "" -f $privkey -key_gen_result=$? +if [[ -z "$missing_objects" && -z "$missing_executables" ]]; then + ssh-keygen -q -t rsa -b 2048 -N "" -f $privkey + key_gen_result=$? -read &>/dev/null < /dev/tcp/localhost/$port -check_port_result=$? + read &>/dev/null < /dev/tcp/localhost/$port + check_port_result=$? -cat > $user_list << EOF -user $LOGNAME $pubkey AFS_READ,AFS_WRITE,VSS_READ,VSS_WRITE + cat > $user_list << EOF + user $LOGNAME $pubkey AFS_READ,AFS_WRITE,VSS_READ,VSS_WRITE EOF -# para_server sends this signal to all processes in the current process group. -trap "" SIGUSR1 - -$PARA_SERVER \ - --logfile "$serverlog" \ - --config_file /dev/null \ - --daemon \ - --loglevel $loglevel \ - --port $port \ - --afs_database_dir "$db" \ - --afs_socket "$sock" \ - --user_list "$user_list" \ - --http_port "$stream_port" \ - --dccp_port "$stream_port" + # para_server sends this signal to all processes in the current process group. + trap "" SIGUSR1 + + + $PARA_SERVER \ + --logfile "$serverlog" \ + --config_file /dev/null \ + --daemon \ + --loglevel $loglevel \ + --port $port \ + --afs_database_dir "$db" \ + --afs_socket "$sock" \ + --user_list "$user_list" \ + --http_port "$stream_port" \ + --dccp_port "$stream_port" +fi for ((i=0; i < ${#commands[@]}; i++)); do command=${commands[$i]}