Samba service; httpd/xfs dependencies changed to know about gw6c.autorun option.

svn path=/nixos/trunk/; revision=10140
This commit is contained in:
Michael Raskin 2008-01-14 11:24:36 +00:00
parent 18ed3e20d1
commit e8ddb6fd2d
4 changed files with 29 additions and 7 deletions

View File

@ -19,7 +19,7 @@ let
enableSSL = false;
extraDirectories = cfg.extraDirectories + extraConfig;
startingDependency = if config.services.gw6c.enable then "gw6c" else "network-interfaces";
startingDependency = if config.services.gw6c.enable && config.services.gw6c.autorun then "gw6c" else "network-interfaces";
webServer = import ../../services/apache-httpd {
inherit (pkgs) apacheHttpd coreutils;

View File

@ -4,7 +4,9 @@ let
user = "smbguest";
group = "smbguest";
smbConfig = ./smb.conf ;
in
{
@ -31,13 +33,23 @@ stop on network-interfaces/stop
start script
${samba}/sbin/nmbd -D &
${samba}/sbin/smbd -D &
${samba}/sbin/winbindd -B &
if ! test -d /home/smbd ; then
mkdir -p /home/smbd
chown ${user} /home/smbd
chmod a+rwx /home/smbd
fi
if ! test -d /var/samba ; then
mkdir -p /var/samba/locks /var/samba/cores/nmbd /var/samba/cores/smbd /var/samba/cores/winbindd
fi
${samba}/sbin/nmbd -D -s ${smbConfig} &
${samba}/sbin/smbd -D -s ${smbConfig} &
${samba}/sbin/winbindd -B -s ${smbConfig} &
end script
respawn ${samba}/sbin/nmbd -D &; ${samba}/sbin/smbd -D &; ${samba}/sbin/winbindd -B &
respawn ${samba}/sbin/nmbd -D -s ${smbConfig} &; ${samba}/sbin/smbd -D -s ${smbConfig} &; ${samba}/sbin/winbindd -B &
";

10
upstart-jobs/smb.conf Normal file
View File

@ -0,0 +1,10 @@
[global]
workgroup = Users
security = share
server string = %h
comment = Samba
local master = no
[default]
path = /home/smbd
read only = no
guest ok = yes

View File

@ -3,7 +3,7 @@
}:
let
configFile = ./xfs.conf;
startingDependency = if config.services.gw6c.enable then "gw6c" else "network-interfaces";
startingDependency = if config.services.gw6c.enable && config.services.gw6c.autorun then "gw6c" else "network-interfaces";
in
rec {
name = "xfs";