default environment for scripts?
* Is there a standard way to define a default environment for /etc/init.d
scripts? Is there any reason not to have a possibility to set such a
default environment? If there isn't wouldn't it be a good idea to be
able to define such an default environment in a standarized way?
I think similar problems can surface in many situations. To put
it in a context/illustrate it:
We're setting up a server for a windows network here. Since windows is
using the 473 codepage or the 850 codepage filenames put on the smb
server from a windoze containing special characters (üöä etc.) will look
fine to the windoze clients but funny in a shell containing strange
characters (squares, questionmarks etc.). We figured the best idea would
be to replace the codepage that linux itself is using, but allthough
wading through FM's for two days we didn't figure out how (pointers?).
So we told samba to use a specific codepage for the translation. Now at
least the filenames are saved with the same encoding as the kernel
uses. To be able to see the filenames correctly (with ls f.ex.) one now
has to set the environment correctly. But processes that are not started
from an interactive shell will not have this environment. In our case
it's cpio that is not able to restore the filenames correctly unless run in
the right environment.
*t
----------------------------------------------------------------------------
Tomas Pospisek
SourcePole - Linux & Open Source Solutions
http://sourcepole.ch
Elestastrasse 18, 7310 Bad Ragaz, Switzerland
Tel: +41 (81) 330 77 11
----------------------------------------------------------------------------
Reply to: