Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for write permission of the temp file (e.g. ro filesystem) #77

Open
ThomDietrich opened this issue Oct 14, 2017 · 3 comments
Open

Comments

@ThomDietrich
Copy link
Member

One initial action should be a test if the data file can be stored. See: https://community.openhab.org/t/oh2-raspi3-crash-and-lost-config/34916/12

@dimon222
Copy link
Member

Is it about installation makefile or state json file? I mean, if u cant even clone the project (no permission?), its obviously you won't reach the state of checking RW filesystem.

@ThomDietrich
Copy link
Member Author

ThomDietrich commented Oct 15, 2017

I'd say these are different shoes. In the particular case the ro filesystem was configured after the initial setup. I would argue, that there are many reasons why a certain file can not be written at some point in the operation time of a system.

I suggest to add a routine to check the ability to write to the given file when starting the script. wdyt?

@ThomDietrich ThomDietrich changed the title Check rw filesystem Check for write permission of the temp file (e.g. ro filesystem) Oct 15, 2017
@dimon222
Copy link
Member

dimon222 commented Oct 15, 2017

Sure, we can do it at the beginning of script or before export
https://github.com/willemdh/FireMotD/blob/master/FireMotD#L693

Or maybe even same as check of sudo?
https://github.com/willemdh/FireMotD/blob/master/FireMotD#L1534

PS: if sudo is assumed, then no point to check?!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants