[Ultrapossum-cvs 266] ultrapossum/module/server ...

Back to archive index

Masato Taruishi taru****@sourc*****
2004年 7月 2日 (金) 02:38:18 JST


===================================================================
RCS file: ultrapossum/module/server/10server,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ultrapossum/module/server/10server	2004/06/24 10:12:54	1.3
+++ ultrapossum/module/server/10server	2004/07/01 17:38:18	1.4
@@ -68,6 +68,7 @@
 INITLDIF=`ultrapossum_getconf INITLDIF $CONFDIR/init.ldif`
 
 INITLDIFDIR=`ultrapossum_getconf INITLDIFDIR $SYSCONFDIR/init.ldif.d`
+SSHKEYDIR=`ultrapossum_getconf SSHKEYDIR $SYSCONFDIR/ssh`
 
 # Default Configuration
 
===================================================================
RCS file: ultrapossum/module/server/Makefile.am,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- ultrapossum/module/server/Makefile.am	2004/06/24 08:43:01	1.10
+++ ultrapossum/module/server/Makefile.am	2004/07/01 17:38:18	1.11
@@ -14,6 +14,8 @@
 	runtime \
 	backup.sh \
 	apps \
+	sshman \
+	fetchldif \
 	pid
 
 TEMPLATES = slapd-ldbm.conf.in \
@@ -56,5 +58,7 @@
 	runtime \
 	backup.sh \
 	apps \
+	sshman \
+	fetchldif \
 	pid
 
===================================================================
RCS file: ultrapossum/module/server/createdb.sh,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- ultrapossum/module/server/createdb.sh	2004/06/16 10:08:47	1.19
+++ ultrapossum/module/server/createdb.sh	2004/07/01 17:38:18	1.20
@@ -101,12 +101,9 @@
 else
  ldiffile=$DIRECTORY/$HOST.ldif
  if ! test -s $ldiffile; then
-   if ssh $MASTER "cat $DIRECTORY/$HOST.ldif && cp /dev/null $DIRECTORY/$HOST.ldif" > $ldiffile; then
-     if ! test -s $ldiffile; then
-       echo "E: Initial LDIF file already fetched." 1>&2
-       /bin/rm -rf $DIRECTORY
-       exit 1
-     fi
+   if $MODULEDIR/server/sshman cmd fetchldif > $ldiffile; then
+     /bin/rm -rf $DIRECTORY
+     exit 1
    else
      echo "E: fail to fetch the initial directory from $MASTER" 1>&2
      /bin/rm -rf $DIRECTORY
===================================================================
RCS file: ultrapossum/module/server/update-server,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- ultrapossum/module/server/update-server	2004/06/24 07:25:28	1.44
+++ ultrapossum/module/server/update-server	2004/07/01 17:38:18	1.45
@@ -278,6 +278,10 @@
     SLURPDSLAVES=$oSLURPDSLAVES
   fi
   configure_slapd
+  if test "x$SLAVES" != "x"; then
+    $MODULEDIR/server/sshman keygen fetchldif
+    $MODULEDIR/server/sshman auth
+  fi
 }
 
 remove() {
@@ -288,6 +292,10 @@
     strip_vaconf $SLAPDCONF "SCHEMA"
     strip_vaconf $SLAPDCONF "DB"
   fi
+  if test "x$SLAVES" = "x"; then
+    /bin/rm -rf $SSHKEYDIR/fetchldif/
+  fi
+  $MODULEDIR/server/sshman unauth
 }
 
 case "x$1" in



Ultrapossum-cvs メーリングリストの案内
Back to archive index