Commit 408e181b authored by iv's avatar iv

Use an array for options added to main config file.

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