Removing trap

This commit is contained in:
Bob Mottram 2018-03-02 19:55:56 +00:00
parent e053de23af
commit f13c18092f
1 changed files with 5 additions and 3 deletions

View File

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