[Fedora-directory-commits] adminserver/admserv/cgi-src40 ds_remove.in, 1.6, 1.7

Richard Allen Megginson (rmeggins) fedora-directory-commits at redhat.com
Mon Jul 14 20:27:04 UTC 2008


Author: rmeggins

Update of /cvs/dirsec/adminserver/admserv/cgi-src40
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5436/adminserver/admserv/cgi-src40

Modified Files:
	ds_remove.in 
Log Message:
Reviewed by: nkinder (Thanks!)
Branch: HEAD
Fix Description: Added -f (force) flag to ds_removal.  The -f (force) flag tells ds_removal to ignore errors and attempt to remove as much as possible.  This is only suggested to be used if ds_removal without the -f flag fails, and you really, really want to remove the ds.
Platforms tested: RHEL5, Fedora 8, Fedora 9
Flag Day: no
Doc impact: no 



Index: ds_remove.in
===================================================================
RCS file: /cvs/dirsec/adminserver/admserv/cgi-src40/ds_remove.in,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- ds_remove.in	7 Aug 2007 23:30:01 -0000	1.6
+++ ds_remove.in	14 Jul 2008 20:27:02 -0000	1.7
@@ -136,6 +136,7 @@
 $ENV{REQUEST_METHOD} = "GET";
 $ENV{QUERY_STRING} = $query->query_string();
 
+my $force = $query->param('force');
 my $instname = $query->param('InstanceName');
 my ($slapd, $inst) = split(/-/, $instname, 2);
 my $configdir = "@instconfigdir@/slapd-$inst";
@@ -189,7 +190,7 @@
 # must get admin password from input (PASSWORD_PIPE?)
 # get admin domain
 # config ds info
-if (!unregisterDSWithConfigDS($inst, \@errs, $inf))
+if (!unregisterDSWithConfigDS($inst, \@errs, $inf) && !$force)
 {
     print "Content-type: text/plain\n\n";
     print "NMC_ErrInfo: ", $res->getText(@errs), "\n";
@@ -229,7 +230,7 @@
                 print STDERR "Warning: Could not stop directory server: $output\n";
             }
             $instdir = $path;    # need to use it later...
-        } else {
+        } elsif (!$force) {
             print "Content-type: text/plain\n\n";
             print "NMC_ErrInfo: The program $prog does not exist\n";
             print "NMC_Status: 1\n";




More information about the Fedora-directory-commits mailing list