In my testing, I have not been able to replicate the scenario you outlined above. But I've come to the conclusion that this is because failures in other parts of the configuration process were contributing factors: fixing one error fixes other errors.
The core problem here is, as you've noted, the processing (or lack therein) of the Options= lines in the YSF2DMR config file: this particular line contains special characters (mainly "=") that is causing the rewrites of the config file(s) to blow up (behind the scenes); other processing errors cascade out from this oversight/flaw.
The following patch should correct this:
Code: Select all
rpi-rw
cd /var/www/dashboard/admin
#sudo cp configure.php /tmp
#cd /tmp
sudo sed -i '/\/\//! s/unset (\$configysf2dmr.*Options/\/\/&/g' configure.php
sudo sed -i '/\/\//! s/unset (\$configysf2dmr.*Local/\/\/&/g' configure.php
sudo sed -i 's/\(.*\)$ysf2dmrContent \(.= $ysf2dmrKey.*$ysf2dmrValue.*\)/\1if ($ysf2dmrKey == "Options" \&\& $ysf2dmrValue) { $ysf2dmrValue = "\\"".$ysf2dmrValue."\\""; }\n\1$syf2dmrContent \2/g' configure.php
#sudo sed -i 's/\(.*\)$dmrgwContent \(.= $dmrgwKey."=".$dmrgwValue.*\)/\1if ($dmrgwKey == "Options" \&\& $dmrgwValue) { $dmrgwValue = "\\"".$dmrgwValue."\\""; }\n\1$dmrgwContent \2/g' configure.php <-- remove this change!
sudo sed -i 's/\(.*if (!isset($configysf2dmr.*YSF Network.*DT2.*; \)}/\1 }\
if (!isset($configysf2dmr\[\x27DMR Network\x27\]\[\x27Options\x27\])) {\
$configysf2dmr\[\x27DMR Network\x27\]\[\x27Options\x27\] = "UserLink=1;TS2_1=".$configysf2dmr\[\x27DMR Network\x27\]\[\x27StartupDstId\x27\];\
}/g' configure.php
Note that this patch does several things:
1) fixes/corrects the rewrites of the Options= lines in the YSF2DMR config file
2) stops the removal of the Options= lines when a config is disabled, so it retained for future reactivation
3) Adds/constructs the Options= line in a new/reactivated config if that line is missing.
This should make your future reconfigurations in the field run a bit smoother from here on out. Hopefully.
Try it out. Fiddle with it! Pound on it! Let me know the results!!