samba: Use /etc/samba as default configuration directory
svn path=/nixpkgs/trunk/; revision=15315
This commit is contained in:
parent
f7454eae9c
commit
8d6fd9cb2b
@ -1,5 +1,15 @@
|
||||
{ stdenv, fetchurl, readline, pam, openldap, kerberos, popt
|
||||
, iniparser, libunwind, fam, acl
|
||||
|
||||
# Eg. smbclient and smbspool require a smb.conf file.
|
||||
# If you set configDir to "" an empty configuration file
|
||||
# $out/lib/smb.conf is is created for you.
|
||||
#
|
||||
# configDir defaults to "/etc/samba" so that smbpassword picks up
|
||||
# the location of its passwd db files from the system configuration file
|
||||
# /etc/samba/smb.conf. That's why nixos touches /etc/samba/smb.conf even if you
|
||||
# don't enable the samba upstart service.
|
||||
, configDir ? "/etc/samba"
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
@ -14,11 +24,14 @@ stdenv.mkDerivation rec {
|
||||
|
||||
preConfigure = "cd source";
|
||||
|
||||
# Provide a dummy smb.conf to shut up programs like smbclient and smbspool.
|
||||
postInstall = ''
|
||||
touch $out/lib/smb.conf
|
||||
'';
|
||||
|
||||
postInstall = if configDir == ""
|
||||
then "touch $out/lib/smb.conf"
|
||||
else "";
|
||||
|
||||
|
||||
# Don't pass --with-private-dir=/var/samba/private
|
||||
# --with-lockdir=/var/samba/lock
|
||||
# the build system will try to create it.
|
||||
configureFlags = ''
|
||||
--with-pam
|
||||
--with-cifsmount
|
||||
@ -26,6 +39,7 @@ stdenv.mkDerivation rec {
|
||||
--with-pam_smbpass
|
||||
--disable-swat
|
||||
--enable-shared-libs
|
||||
--with-configdir=${configDir}
|
||||
${if stdenv.gcc.libc != null then "--with-libiconv=${stdenv.gcc.libc}" else ""}
|
||||
'';
|
||||
}
|
||||
|
@ -4482,7 +4482,7 @@ let
|
||||
inherit xmpppy python makeWrapper fetchcvs;
|
||||
};
|
||||
|
||||
samba = import ../servers/samba {
|
||||
samba = makeOverridable (import ../servers/samba) {
|
||||
inherit stdenv fetchurl readline openldap pam kerberos popt iniparser
|
||||
libunwind acl fam;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user