From f13c18092ff0a20ef84c898e965375c1b3630a2a Mon Sep 17 00:00:00 2001
From: Bob Mottram <bob@freedombone.net>
Date: Fri, 2 Mar 2018 19:55:56 +0000
Subject: [PATCH] Removing trap

---
 src/freedombone-app-postactiv | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/freedombone-app-postactiv b/src/freedombone-app-postactiv
index a0addb23..74d5ec77 100755
--- a/src/freedombone-app-postactiv
+++ b/src/freedombone-app-postactiv
@@ -119,7 +119,6 @@ function install_interactive_postactiv {
         while [ ! $POSTACTIV_DETAILS_COMPLETE ]
         do
             data=$(mktemp 2>/dev/null)
-            trap "rm -f $data" 0 1 2 5 15
             if [[ $DDNS_PROVIDER == "default@freedns.afraid.org" ]]; then
                 dialog --backtitle $"Freedombone Configuration" \
                        --title $"PostActiv Configuration" \
@@ -140,8 +139,10 @@ function install_interactive_postactiv {
             fi
             sel=$?
             case $sel in
-                1) exit 1;;
-                255) exit 1;;
+                1) rm -f "$data"
+                   exit 1;;
+                255) rm -f "$data"
+                     exit 1;;
             esac
             POSTACTIV_DOMAIN_NAME=$(sed -n 1p < "$data")
             title=$(sed -n 2p < "$data")
@@ -174,6 +175,7 @@ function install_interactive_postactiv {
             if [ $POSTACTIV_DOMAIN_NAME ]; then
                 POSTACTIV_DETAILS_COMPLETE="yes"
             fi
+            rm -f "$data"
         done
 
         # remove any invalid characters