Rev 442: don't start nfs services unless the relevant directories are available in http://samba.org/~tridge/ctdb

tridge at samba.org tridge at samba.org
Sun Jun 3 04:39:28 GMT 2007


------------------------------------------------------------
revno: 442
revision-id: tridge at samba.org-20070603043927-duv31mw1amr5hkfs
parent: tridge at samba.org-20070603032107-p22c1plg1zp468ov
committer: Andrew Tridgell <tridge at samba.org>
branch nick: tridge
timestamp: Sun 2007-06-03 14:39:27 +1000
message:
  don't start nfs services unless the relevant directories are available
modified:
  config/events.d/nfs            nfs-20070601141008-hy3h4qgbk1jd2jci-1
  config/events.d/nfslock        nfslock-20070601105340-vlcvnp6euoj3zdwy-2
  config/events.d/samba          samba-20070601105340-vlcvnp6euoj3zdwy-3
=== modified file 'config/events.d/nfs'
--- a/config/events.d/nfs	2007-06-02 08:51:05 +0000
+++ b/config/events.d/nfs	2007-06-03 04:39:27 +0000
@@ -13,6 +13,11 @@
 case $cmd in 
      startup)
 	mkdir -p /etc/ctdb/state/nfs
+
+	# wait for all nfs exported directories to become available
+	nfs_dirs=`cut -d' ' -f1 /etc/exports`
+	ctdb_wait_directories "NFS" $nfs_dirs
+
 	service nfs start
 	;;
 

=== modified file 'config/events.d/nfslock'
--- a/config/events.d/nfslock	2007-06-02 06:44:15 +0000
+++ b/config/events.d/nfslock	2007-06-03 04:39:27 +0000
@@ -7,12 +7,16 @@
 [ -z $CTDB_MANAGES_NFS ] && exit 0
 [ $CTDB_MANAGES_NFS != "yes" ] && exit 0
 
+[ -z "$STATD_SHARED_DIRECTORY" ] && exit 0
+
 cmd="$1"
 shift
 
 case $cmd in 
      startup)
 	/bin/mkdir -p /etc/ctdb/state/statd/ip
+	ctdb_wait_directories "nfslock" "$STATD_SHARED_DIRECTORY"
+
 	service nfslock start
 	;;
 

=== modified file 'config/events.d/samba'
--- a/config/events.d/samba	2007-06-02 08:51:05 +0000
+++ b/config/events.d/samba	2007-06-03 04:39:27 +0000
@@ -13,6 +13,10 @@
 
 case $cmd in 
      startup)
+	# wait for all shared directories to become available
+	smb_dirs=`testparm -st 2> /dev/null | egrep '^\s*path = '  | cut -d= -f2`
+	ctdb_wait_directories "Samba" $smb_dirs	
+
 	# start Samba service
 	service smb start
 	service winbind start
@@ -20,10 +24,6 @@
 	# wait for the Samba tcp ports to become available
 	smb_ports=`testparm -stv 2> /dev/null | egrep '\s*smb ports =' | cut -d= -f2`
 	ctdb_wait_tcp_ports "Samba" $smb_ports
-
-	# wait for all shared directories to become available
-	smb_dirs=`testparm -st 2> /dev/null | egrep '^\s*path = '  | cut -d= -f2`
-	ctdb_wait_directories "Samba" $smb_dirs	
 	;;
 	
      takeip)



More information about the samba-cvs mailing list