Re: [Samba] Include directory in smb.conf

2012-02-13 Thread Santiago Diez
Hello,

Thanks Christ for your answer.
Could you explain a bit more, I have no idea what *C PreProcessing* is.

Regards
-
*Santiago DIEZ*
*Director*
*+33 6 37 90 81 98*
-


-
*Quark Systems & CAOBA*
*23 rue du Buisson Saint-Louis, 75010 Paris
*-



On Fri, Feb 10, 2012 at 20:30, Christ Schlacta  wrote:

> On 2/10/2012 3:32, Santiago Diez wrote:
>
>> Hi there,
>>
>> Thanks Nicol and Moray for your participation.
>>
>> Yes Nicol, I do have a particular need :
>> I find it very usefull to be able to manage atomic configuration options
>> adding or removing files rather than editing lines inside files.
>> I use */etc/cron.d/*, */etc/sudoers.d/*, */etc/init.d/*, *
>> /etc/apache/sites-enabled/* very often!
>>
>> Take *cron*, if I want to activate a job that setup time, I need to
>> include
>>
>> this line in /etc/crontab
>> 0 0 * * * root ntpdate my_ntp_server
>> But maybe I have multiple lines, maybe I want to do that automaticaly on
>> multiple servers.
>> If so, I'll need to setup a very techy sed command to make sure the cron
>> doesn't exist already, etc...
>> With cron.d, I only have to run
>> echo "0 0 * * * root ntpdate my_ntp_server">  /etc/cron.d/ntpdate
>>  If it doesn't exist, it is created, if it exist, it is updated with new
>> parameters.
>>
>> Take *samba*, I manage multiple servers for many very small charity
>>
>> organization or independent workers.
>> I'd be very happy to have 1 unique configuration file for all servers and
>> then atomic share config files in a directory network dependant.
>> Same thing that for cron, I don't want complex sed commands.
>> I want to echo the configuration for *one share* into *one file*.
>>
>> If it exists, it's replaced, if it doesn't, it is created.
>>
>>
>> Moray, your idea's good, I can probably get around by changing the script
>> /etc/init.d/samba.
>> Adding a simple script line that would build the config file from template
>> + shares.d everytime I start the service.
>>
>>
>> Santiago
>> -
>> *Santiago DIEZ*
>> *Director*
>> *+33 6 37 90 81 98*
>> -
>>
>> > free.fr%2Flogo.png&sa=D&sntz=**1&usg=**AFrqEzfmW2Io3OI5IqEGiVeDRebZgD**
>> 4TaQ
>> >
>> -
>> *Quark Systems&  CAOBA*
>> *23 rue du Buisson Saint-Louis, 75010 Paris
>> *-
>>
>>
>>
>>
>> On Fri, Feb 10, 2012 at 11:16, Moray Henderson<
>> Moray.Henderson@ict-software.**org >
>>  wrote:
>>
>>  From: Santiago Diez [mailto:santiago.d...@caoba.fr**]
 Sent: 09 February 2012 18:04

 Hi there,

 I'm wondering if there any patch or recent developement that would
 allow to
 include a directory rather than a file in smb.conf

 Something like

 includedir = /etc/samba/shares.d/

 instead of

 include = /etc/samba/shares.conf

 Thanks for your help

>>> We get around that by using script which builds smb.conf from a template
>>> and
>>> the contents of a config directory.  It would be nice to have the
>>> facility
>>> built in to Samba, though.
>>>
>>>
>>> Moray.
>>> "To err is human; to purr, feline."
>>>
>>>
>>>
>>>
>>>
>>>  If you can do without # Comments, you can get away with using the C
> PreProcessor to pre-process your files.
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  
> https://lists.samba.org/**mailman/options/samba
>
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Include directory in smb.conf

2012-02-10 Thread Christ Schlacta

On 2/10/2012 3:32, Santiago Diez wrote:

Hi there,

Thanks Nicol and Moray for your participation.

Yes Nicol, I do have a particular need :
I find it very usefull to be able to manage atomic configuration options
adding or removing files rather than editing lines inside files.
I use */etc/cron.d/*, */etc/sudoers.d/*, */etc/init.d/*, *
/etc/apache/sites-enabled/* very often!

Take *cron*, if I want to activate a job that setup time, I need to include
this line in /etc/crontab
0 0 * * * root ntpdate my_ntp_server
But maybe I have multiple lines, maybe I want to do that automaticaly on
multiple servers.
If so, I'll need to setup a very techy sed command to make sure the cron
doesn't exist already, etc...
With cron.d, I only have to run
echo "0 0 * * * root ntpdate my_ntp_server">  /etc/cron.d/ntpdate
  If it doesn't exist, it is created, if it exist, it is updated with new
parameters.

Take *samba*, I manage multiple servers for many very small charity
organization or independent workers.
I'd be very happy to have 1 unique configuration file for all servers and
then atomic share config files in a directory network dependant.
Same thing that for cron, I don't want complex sed commands.
I want to echo the configuration for *one share* into *one file*.
If it exists, it's replaced, if it doesn't, it is created.


Moray, your idea's good, I can probably get around by changing the script
/etc/init.d/samba.
Adding a simple script line that would build the config file from template
+ shares.d everytime I start the service.


Santiago
-
*Santiago DIEZ*
*Director*
*+33 6 37 90 81 98*
-


-
*Quark Systems&  CAOBA*
*23 rue du Buisson Saint-Louis, 75010 Paris
*-



On Fri, Feb 10, 2012 at 11:16, Moray Henderson<
moray.hender...@ict-software.org>  wrote:


From: Santiago Diez [mailto:santiago.d...@caoba.fr]
Sent: 09 February 2012 18:04

Hi there,

I'm wondering if there any patch or recent developement that would
allow to
include a directory rather than a file in smb.conf

Something like

includedir = /etc/samba/shares.d/

instead of

include = /etc/samba/shares.conf

Thanks for your help

We get around that by using script which builds smb.conf from a template
and
the contents of a config directory.  It would be nice to have the facility
built in to Samba, though.


Moray.
"To err is human; to purr, feline."





If you can do without # Comments, you can get away with using the C 
PreProcessor to pre-process your files.

--
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Include directory in smb.conf

2012-02-10 Thread Santiago Diez
Hi there,

Thanks Nicol and Moray for your participation.

Yes Nicol, I do have a particular need :
I find it very usefull to be able to manage atomic configuration options
adding or removing files rather than editing lines inside files.
I use */etc/cron.d/*, */etc/sudoers.d/*, */etc/init.d/*, *
/etc/apache/sites-enabled/* very often!

Take *cron*, if I want to activate a job that setup time, I need to include
this line in /etc/crontab
0 0 * * * root ntpdate my_ntp_server
But maybe I have multiple lines, maybe I want to do that automaticaly on
multiple servers.
If so, I'll need to setup a very techy sed command to make sure the cron
doesn't exist already, etc...
With cron.d, I only have to run
echo "0 0 * * * root ntpdate my_ntp_server" > /etc/cron.d/ntpdate
 If it doesn't exist, it is created, if it exist, it is updated with new
parameters.

Take *samba*, I manage multiple servers for many very small charity
organization or independent workers.
I'd be very happy to have 1 unique configuration file for all servers and
then atomic share config files in a directory network dependant.
Same thing that for cron, I don't want complex sed commands.
I want to echo the configuration for *one share* into *one file*.
If it exists, it's replaced, if it doesn't, it is created.


Moray, your idea's good, I can probably get around by changing the script
/etc/init.d/samba.
Adding a simple script line that would build the config file from template
+ shares.d everytime I start the service.


Santiago
-
*Santiago DIEZ*
*Director*
*+33 6 37 90 81 98*
-


-
*Quark Systems & CAOBA*
*23 rue du Buisson Saint-Louis, 75010 Paris
*-



On Fri, Feb 10, 2012 at 11:16, Moray Henderson <
moray.hender...@ict-software.org> wrote:

> > From: Santiago Diez [mailto:santiago.d...@caoba.fr]
> > Sent: 09 February 2012 18:04
> >
> > Hi there,
> >
> > I'm wondering if there any patch or recent developement that would
> > allow to
> > include a directory rather than a file in smb.conf
> >
> > Something like
> >
> > includedir = /etc/samba/shares.d/
> >
> > instead of
> >
> > include = /etc/samba/shares.conf
> >
> > Thanks for your help
>
> We get around that by using script which builds smb.conf from a template
> and
> the contents of a config directory.  It would be nice to have the facility
> built in to Samba, though.
>
>
> Moray.
> "To err is human; to purr, feline."
>
>
>
>
>
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Include directory in smb.conf

2012-02-10 Thread Moray Henderson
> From: Santiago Diez [mailto:santiago.d...@caoba.fr]
> Sent: 09 February 2012 18:04
> 
> Hi there,
> 
> I'm wondering if there any patch or recent developement that would
> allow to
> include a directory rather than a file in smb.conf
> 
> Something like
> 
> includedir = /etc/samba/shares.d/
> 
> instead of
> 
> include = /etc/samba/shares.conf
> 
> Thanks for your help

We get around that by using script which builds smb.conf from a template and
the contents of a config directory.  It would be nice to have the facility
built in to Samba, though.


Moray.
"To err is human; to purr, feline."




-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


Re: [Samba] Include directory in smb.conf

2012-02-09 Thread Nico Kadel-Garcia
On Thu, Feb 9, 2012 at 1:04 PM, Santiago Diez  wrote:
> Hi there,
>
> I'm wondering if there any patch or recent developement that would allow to
> include a directory rather than a file in smb.conf
>
> Something like
>
> includedir = /etc/samba/shares.d/
>
> instead of
>
> include = /etc/samba/shares.conf

That seems potentially destabilizing, and makes for considerably more
complex parsing of a target directory. In particular, order
sensitivity of included files is a pain in the ass and can be
enormously destabilizing.  And me, I'd be concerned that some idiot
would point to an auto-mounted or NFS-mounted directory and lead to
all *sorts* of timeout craziness.

This kind of approach is, of course, used for other tools like Nagios
and NRPE and httpd. But it can get very tricky to handle. If I had to
have a configuration for Samba built up from dynamically arranged
smaller components, I'd set up /etc/samba/Makefile, drop components in
/etc/samba/*.conf, and use it to build and source control
/etc/samba/smb.conf.

Do you have some particular need for this? Or did it just seem like a good idea?
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba


[Samba] Include directory in smb.conf

2012-02-09 Thread Santiago Diez
Hi there,

I'm wondering if there any patch or recent developement that would allow to
include a directory rather than a file in smb.conf

Something like

includedir = /etc/samba/shares.d/

instead of

include = /etc/samba/shares.conf

Thanks for your help

Santiago
-
*Santiago DIEZ*
*Director*
*+33 6 37 90 81 98*
-


-
*Quark Systems & CAOBA*
*23 rue du Buisson Saint-Louis, 75010 Paris
*-
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba