mwarning / zerotier-openwrt

A OpenWrt package for ZeroTier One - Pull requests are welcome!
669 stars 140 forks source link

Create config_path if not exist #89

Closed SalimTerryLi closed 3 years ago

SalimTerryLi commented 3 years ago

Why not?

mwarning commented 3 years ago

If the directory name contains a typo, then the directory would be created and populated automatically. This would propbably be on the flash. This should be avoided and thus the need for manual the explicitness to create the directory by hand.

mwarning commented 3 years ago

Thank you for having a look at the logic. But I think this behavior is fine. If you want to extend a comment (like you did in the his MR), feel free to submit it as a separate commit.

SalimTerryLi commented 3 years ago

If the directory name contains a typo, then the directory would be created and populated automatically anyway. This would propbably on the flash. This should be avoided and thus the need for manual the explicitness to create the directory by hand.

It makes sense but the overall user experience is really bad. I cannot tell if a new user without necessary knowledge facing this problem he could solve by himself or not. If he can, there must be a lot to investigate.

In fact I am confused at the first time when I changed the configuration and then reboot the device instead of restart the service that missed the message. Then I need to dig into the source and try to understand the symbol logic and find I only need an empty folder to make it work. It will also happens when someone make the config backup and then restore on new system but find it not work at all. Not everybody is familiar with ssh configuration. On my personal view I'd trust someone who is thinking of change the persistent storage and warn that man at a proper place.

There must be something that can be improved. I'll give up here for that find no helpful solution(but solved my own use case)

mwarning commented 3 years ago

Sorry to hear that you feel that way. What could be done would be to improve the error message, saying that the user should create it and to make the message less likely to be missed.

Btw., did you configure ZT via web interface? I would expect that you do not see an error message here.