2bf029bae6
synthesisers including additive, subtractive and a few organs. The application consists of the engine, which is called bristol, and its own GUI library called brighton that represents all the emulations. WWW: http://bristol.sourceforge.net/ PR: ports/169861 Submitted by: pjm <pierrejacqes.mimifir@gmail.com>
44 lines
1.3 KiB
Text
44 lines
1.3 KiB
Text
--- bin/startBristol.in.orig 2012-04-27 13:07:18.000000000 +0200
|
|
+++ bin/startBristol.in 2012-09-24 13:30:26.589848964 +0200
|
|
@@ -39,14 +39,19 @@
|
|
#PORT=5028
|
|
# Randomise the port numbers, can be overridden by -port which would be a
|
|
# requirement for multitimbral
|
|
-PORT=`date +%N`
|
|
-PORT=`expr $PORT % 65536` >/dev/null 2>&1
|
|
-if [ -z $PORT ]; then
|
|
- PORT=`date +%s`
|
|
+UNAME=`uname`
|
|
+if [ "${UNAME}x" = "FreeBSDx" ]; then
|
|
+ PORT=`jot -r 1 1025 65536`
|
|
+else
|
|
+ PORT=`date +%N`
|
|
PORT=`expr $PORT % 65536` >/dev/null 2>&1
|
|
-fi
|
|
-if [ $PORT -lt 1024 ]; then
|
|
- PORT=`expr $PORT + 5028`
|
|
+ if [ -z $PORT ]; then
|
|
+ PORT=`date +%s`
|
|
+ PORT=`expr $PORT % 65536` >/dev/null 2>&1
|
|
+ fi
|
|
+ if [ $PORT -lt 1024 ]; then
|
|
+ PORT=`expr $PORT + 5028`
|
|
+ fi
|
|
fi
|
|
|
|
valgrind=0
|
|
@@ -497,12 +502,12 @@
|
|
fi
|
|
else
|
|
echo checking availability of TCP port $PORT
|
|
- netstat -taln | awk '{print $4}' | grep $PORT > /dev/null
|
|
+ netstat -a -f inet -p tcp -ln | grep $PORT > /dev/null
|
|
while [ $? -eq 0 ]; do
|
|
echo -n "port looked busy, trying "
|
|
PORT=`expr $PORT + 1`
|
|
echo $PORT
|
|
- netstat -taln | grep $PORT > /dev/null
|
|
+ netstat -a -f inet -p tcp -ln | grep $PORT > /dev/null
|
|
done
|
|
if [ ${PORT} -lt 1024 -a ${USER} != "root" ]; then
|
|
echo you may not have permissions for ports less than 1024
|