diff options
author | Gerald Carter <jerry@samba.org> | 2003-09-24 15:05:22 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2003-09-24 15:05:22 +0000 |
commit | 293421f3c64a2adff7dc15f7ad3adb6120c9fd16 (patch) | |
tree | b18b6e0cda6e04dac9f47ab9fdb661f1dfa65b7b /examples/LDAP/smbldap-tools/smbldap-groupdel.pl | |
parent | 43004ba8830874a8ab02bc755b1e99160af982b5 (diff) | |
download | samba-293421f3c64a2adff7dc15f7ad3adb6120c9fd16.tar.gz samba-293421f3c64a2adff7dc15f7ad3adb6120c9fd16.tar.bz2 samba-293421f3c64a2adff7dc15f7ad3adb6120c9fd16.zip |
syncing up docs, examples, & packaging from 3.0
(This used to be commit dd1348c566b4700ea01bd89639e2d3330c878167)
Diffstat (limited to 'examples/LDAP/smbldap-tools/smbldap-groupdel.pl')
-rwxr-xr-x | examples/LDAP/smbldap-tools/smbldap-groupdel.pl | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/LDAP/smbldap-tools/smbldap-groupdel.pl b/examples/LDAP/smbldap-tools/smbldap-groupdel.pl index 3d072585b2..89d0d993ac 100755 --- a/examples/LDAP/smbldap-tools/smbldap-groupdel.pl +++ b/examples/LDAP/smbldap-tools/smbldap-groupdel.pl @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/perl -w # This code was developped by IDEALX (http://IDEALX.org/) and # contributors (their names can be found in the CONTRIBUTORS file). @@ -23,6 +23,9 @@ # Purpose of smbldap-groupdel : group (posix) deletion use strict; +use FindBin; +use FindBin qw($RealBin); +use lib "$RealBin/"; use smbldap_tools; use smbldap_conf; @@ -48,9 +51,7 @@ if (!defined($dn_line = get_group_dn($_groupName))) { my $dn = get_dn_from_line($dn_line); -my $rc = system "$ldapdelete $dn >/dev/null"; -die "$0: error while deleting group $_groupName\n" - unless ($rc == 0); +group_del($dn); my $nscd_status = system "/etc/init.d/nscd status >/dev/null 2>&1"; |