Commit 408e181b by iv

Use an array for options added to main config file.

1 parent cd35f7ec
......@@ -4,7 +4,7 @@
mountpoint="/media/removable"
configdir="/home/chronos/user/.re6stconf"
configfile="${configdir}/re6stnet.conf"
options=""
options=()
install -d ${configdir}
......@@ -18,7 +18,7 @@ fi
read -p "set re6st route as default [Y/n]? " default
if [ "$default" == "y" -o "$default" == "Y" -o "$default" == "" ] ; then
options+="default "
options+=('default')
fi
read -p "save configuration on an external device [Y/n]? " save
......@@ -40,11 +40,9 @@ else
echo "Configuration will be placed in ${configfile}, please do manually backup later or you could lose your access."
fi
re6st-conf --registry "${registry}" --token "${token}" --dir ${configdir}
#re6st-conf --registry "${registry}" --token "${token}" --dir ${configdir}
for opt in $options; do
echo "$opt" >> ${configfile}
done
printf '%s\n' "${options[@]}" >> ${configfile}
echo """
*filter
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!