This repository has been archived by the owner on Dec 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
107 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
os_name="Kerberos.io OS" | ||
os_short_name="kios" | ||
os_prefix="kios" | ||
os_version="2.6.0" | ||
os_version="2.6.1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
#!/bin/bash | ||
|
||
########################################## | ||
# | ||
# Update configuration files for machinery | ||
# | ||
|
||
KERBEROS_CONFIG_DIR="/etc/opt/kerberosio/config" | ||
DATA_CONFIG_DIR="/data/machinery/config" | ||
TEMP_CONFIG_DIR="/tmp/config" | ||
|
||
# Copy files to tmp folder and overwrite data config files | ||
|
||
rm -rf $TEMP_CONFIG_DIR | ||
mkdir -p $TEMP_CONFIG_DIR | ||
cp -r $DATA_CONFIG_DIR/* $TEMP_CONFIG_DIR | ||
cp -r $KERBEROS_CONFIG_DIR/* $DATA_CONFIG_DIR | ||
|
||
# Loop over old config files and adjust new configuration | ||
# with previous values. | ||
|
||
for oldfile in $TEMP_CONFIG_DIR/* | ||
do | ||
for newfile in $DATA_CONFIG_DIR/* | ||
do | ||
if [ ${oldfile#$TEMP_CONFIG_DIR} == ${newfile#$DATA_CONFIG_DIR} ] | ||
then | ||
lineNumber=1 | ||
|
||
while read p | ||
do | ||
name=`echo $p | grep -E "\<(.*?)\>(.*?)<(.*?)\>" | cut -d ">" -f1 | cut -d "<" -f2 | cut -d " " -f1` | ||
value=`echo $p | grep -E "\<(.*?)\>(.*?)<(.*?)\>" | cut -d ">" -f2 | cut -d "<" -f1` | ||
|
||
if [ -n "$name" ] | ||
then | ||
#echo "looking for " $name " in " $newfile " with old value " $value | ||
|
||
while read -r line ; do | ||
number=`echo $line | cut -d ':' -f1` | ||
if [[ $lineNumber -le $number ]] | ||
then | ||
newvalue=`echo $line | sed -e "s/^$number:[ \t]*//"` | ||
echo $newvalue | ||
if [[ "$p" != "$newvalue" ]] | ||
then | ||
# convert & special characters. | ||
p=`echo $p | sed "s#\&#aampperssand#g"` | ||
|
||
sed $number"s#$newvalue#$p#" $newfile > $newfile"1" | ||
|
||
# revert special characters | ||
sed $number"s#aampperssand#\&#g" $newfile"1" > $newfile"2" | ||
rm $newfile"1" | ||
|
||
mv $newfile"2" $newfile | ||
fi | ||
lineNumber=$number | ||
break | ||
fi | ||
done <<< "$(grep -n "$name " $newfile)" | ||
fi | ||
|
||
done < $oldfile | ||
fi | ||
done | ||
done | ||
|
||
chmod -R 777 $DATA_CONFIG_DIR | ||
|
||
mkdir -p /data/machinery/h264 | ||
chmod -R 777 /data/machinery/h264 | ||
|
||
########################################## | ||
# | ||
# Update configuration files for web | ||
# | ||
|
||
cp /var/www/web/config/app.php /data/web/config/app.php | ||
chmod 777 /data/web/config/app.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c | ||
index 261e970b75..a8f10485f9 100644 | ||
--- a/libavformat/rtsp.c | ||
+++ b/libavformat/rtsp.c | ||
@@ -949,6 +949,12 @@ static void rtsp_parse_transport(AVFormatContext *s, | ||
&th->server_port_max, &p); | ||
} | ||
} else if (!strcmp(parameter, "interleaved")) { | ||
+ /* | ||
+ * Workaround for some chinese cameras | ||
+ * This should be safe as RFC states that 'interleaved' is for TCP | ||
+ * ref Page 40 of rfc2326 | ||
+ */ | ||
+ th->lower_transport = RTSP_LOWER_TRANSPORT_TCP; | ||
if (*p == '=') { | ||
p++; | ||
rtsp_parse_range(&th->interleaved_min, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters