summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <lass@aidsballs.de>2014-04-21 00:27:08 +0200
committerlassulus <lass@aidsballs.de>2014-04-21 00:27:08 +0200
commit9d0d795cba510ce356b1eac1e529e03f6bc6cb12 (patch)
treea0a65886ecd412baee31ec9dc68ec4ceadb70e48
parent6c8535ee8fdfa2d0918ec4c8f345f1d6a18589e5 (diff)
tinc_install: abort on - in hostname
-rwxr-xr-xretiolum/scripts/tinc_setup/new_install.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/retiolum/scripts/tinc_setup/new_install.sh b/retiolum/scripts/tinc_setup/new_install.sh
index b48649ec..cd2fdde1 100755
--- a/retiolum/scripts/tinc_setup/new_install.sh
+++ b/retiolum/scripts/tinc_setup/new_install.sh
@@ -43,6 +43,11 @@ main(){
RAND4=1
RAND6=1
+ if $(echo $HOSN | grep -q -); then
+ echo 'invalid hostname, - not allowed'
+ exit 1
+ fi
+
if [ $IP4 -eq 0 ]; then
RAND4=1