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
7 changed files
with
194 additions
and
9 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.5.0" | ||
os_version="2.6.0" |
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
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,59 @@ | ||
From 9908872aaa614a6c4bba80d7a5f1adea7ca7117e Mon Sep 17 00:00:00 2001 | ||
From: Peter Seiderer <[email protected]> | ||
Date: Tue, 14 Feb 2017 21:27:59 +0100 | ||
Subject: [PATCH] ir-ctl: fixes for musl compile | ||
|
||
- add copy of TEMP_FAILURE_RETRY macro | ||
- use strdup instead of strdupa | ||
|
||
Fixes [1]: | ||
|
||
ir-ctl.c:(.text+0xb06): undefined reference to `strndupa' | ||
ir-ctl.c:(.text+0xe01): undefined reference to `TEMP_FAILURE_RETRY' | ||
|
||
[1] http://autobuild.buildroot.net/results/b8b96c7bbf2147dacac62485cbfdbcfd758271a5 | ||
|
||
Signed-off-by: Peter Seiderer <[email protected]> | ||
--- | ||
utils/ir-ctl/ir-ctl.c | 13 ++++++++++++- | ||
1 file changed, 12 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/utils/ir-ctl/ir-ctl.c b/utils/ir-ctl/ir-ctl.c | ||
index bc58cee..e9da777 100644 | ||
--- a/utils/ir-ctl/ir-ctl.c | ||
+++ b/utils/ir-ctl/ir-ctl.c | ||
@@ -44,6 +44,15 @@ | ||
|
||
# define N_(string) string | ||
|
||
+/* taken from glibc unistd.h */ | ||
+#ifndef TEMP_FAILURE_RETRY | ||
+#define TEMP_FAILURE_RETRY(expression) \ | ||
+ (__extension__ \ | ||
+ ({ long int __result; \ | ||
+ do __result = (long int) (expression); \ | ||
+ while (__result == -1L && errno == EINTR); \ | ||
+ __result; })) | ||
+#endif | ||
|
||
/* See drivers/media/rc/ir-lirc-codec.c line 23 */ | ||
#define LIRCBUF_SIZE 512 | ||
@@ -344,12 +353,14 @@ static struct file *read_scancode(const char *name) | ||
return NULL; | ||
} | ||
|
||
- pstr = strndupa(name, p - name); | ||
+ pstr = strndup(name, p - name); | ||
|
||
if (!protocol_match(pstr, &proto)) { | ||
fprintf(stderr, _("error: protocol '%s' not found\n"), pstr); | ||
+ free(pstr); | ||
return NULL; | ||
} | ||
+ free(pstr); | ||
|
||
if (!strtoscancode(p + 1, &scancode)) { | ||
fprintf(stderr, _("error: invalid scancode '%s'\n"), p + 1); | ||
-- | ||
2.11.0 | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# Locally calculated | ||
sha256 164abf5c1befcd27e8e6ef824a82d4015bdfb5d99ae82daa00e77d895ff9864c v4l-utils-1.6.3.tar.bz2 | ||
sha256 ac9f8c88bfffa3a7e85c0edd04f7d3d54e6a30c214e79f2c6ecc6fbf57cb229d v4l-utils-1.12.2.tar.bz2 |
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