[Samba] Re: [Samba]smb.conf and Environment Variables

Christian Barth barth at cck.uni-kl.de
Wed Jan 30 01:13:06 GMT 2002


> I don't know Sanjiv's situation, but I could also use something like
> that.  What I have is an Oracle database running on a Unix box.  For
> some of the applications, users need to copy files from their PC to the
> Unix box where Oracle can get at them, then run an Oracle script to
> process those text files.  Users drop these files into $AP_TOP (an
> environment variable set by a global setup file) and the scripts use the
> same environment variable to find them.  Currently users use FTP to get
> the files from their machines to the Unix box, then move them to
> $AP_TOP.  I would like to use Samba to make it easier for them.
> 
> I could just define the share based on the current value of $AP_TOP, but
> occasionally during the course of installing updates or reallocating
> filesystems, the Oracle DBA will move the location $AP_TOP.  Currently
> he just changes the value of the environment variable setting in the
> global file and both users and the Oracle scripts are happy.  If we go
> to Samba, then we will have to remember to also change the share
> definition as well.  I feel that it would be less error prone if I could
> just get Samba to read the same global setup file and just use the
> environment variable to set the share path.

What about a hack like this:
Modify your samba startup script (/etc/init.d/samba or what ever)
to do some thing like:

  echo "
  ....
  ....
  [Oracel Data]
    path=$AP_TOP
    readonly = no
  ....
  .... " > /usr/local/samba/lib/smb.conf
  nmbd -D
  smbd -D

OK,
you have to restart samba for this to be effectiv. But if you include 
the samba startup into the oracel startup you should be happy. (Or 
does oracel not have to be restarted after updates and filesystem 
relocations?)

Christian

               _(_)_                          wWWWw   _
   @@@@       (_)@(_)   vVVVv     _     @@@@  (___) _(_)_
  @@()@@ wWWWw  (_)\    (___)   _(_)_  @@()@@   Y  (_)@(_)
   @@@@  (___)     `|/    Y    (_)@(_)  @@@@   \|/   (_)\
    /      Y       \|    \|/    /(_)    \|      |/      |
 \ |     \ |/       | / \ | /  \|/       |/    \|      \|/
jgs|//   \\|///  \\\|//\\\|/// \|///  \\\|//  \\|//  \\\|// 
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^




More information about the samba mailing list