Quote:
Originally Posted by Carpetsmoker
I'm sorry, but this is just wrong. lTry to use the locale(1) utility if available, and if it isn't try checking the LC_* manually. If all else fails, use a sane default (pl_PL.ISO8859-2 is not what I would consider a sane default).
|
But that would not tell me the codepage, even if I would 'grab' the encoding from LC_ALL or LANG or whatever, I would have to keep a table of mappings like that:
pl_PL.ISO8859-2 cp852
... and I do not want to write it myself, besides, You set these options ONCE, then use it all the time, I may even put the 'settings' into the *.conf file, good idea I think.
Also these values are there because I did not finished working on this daemon yet, these are just mine settings.
There is also other 'issue', the 'mount' encoding and my user encoding are different
Quote:
Originally Posted by Carpetsmoker
And overriding the user's PATH ... ? Have you been drinking?
|
The script would be always run by root (triggered by devd), its like You would blame me for the same PATH settings for cron daemon at /etc/crontab.
Quote:
Originally Posted by Carpetsmoker
And what's with the underscoritus It almost looks like Python
|
It makes code cleaner, let me explain how I see it, commands/built-ins/keywords are
lowercase words, all variables, no matter global/local/temporary are
UPPERCASE, functions start with two underscores (two instead of one for better readability), like
__lower_case_name.
Typing scripts that way the moment when I look at something I already know what it does and what does not, at least it helps me a lot to write/reuse/modify scripts faster and do not waste time on figuring, keeps WTFs/min at rather low value