public class CharEx {
public static void main(String[] args) {
char c;
c = 'a';
System.out.println(c);
if ( c >= '0' && c <= '9' )
System.out.println (c + " is a digit.");
if ( (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') )
System.out.println (c + " is a letter.");
}
}
#
# Check lock
#
[[ -f $lockfile ]] && cleanup 10
touch $lockfile
#
# Stop slapd
#
echo "Stopping LDAP..."
date
service slapd stop
date
#
# setup vars
#
today=$(date +"%y%m%d%H%M%S")
ldiffile=/hvcc/ldap/export/export-$today.ldif
backuppath=/hvcc/ldap/backup
bdbbackupfile=$backuppath/hvcc.edu.$(date +"%y%m%d").backup
logbackupfile=$backuppath/hvcc.edu.logs.$(date +"%y%m%d").backup
bdbpath=/var/lib/ldap
logpath=/var/lib/ldap
import sys, os, fcntl, time
import hvcc_gen_lib as hgl
import hvcc_ldap_lib as hll
if len(sys.argv) != 3:
print "args: %d" % (len(sys.argv))
print '\nUsage:\t%s "listname" "dl|mm"\n' % (sys.argv[0])
print 'dl for distribution list, mm for mailing list (Mailman)\n'
sys.exit(1)
lname = sys.argv[1]
dl = sys.argv[2]
#
# Open a rootdn connection
#
conn = hll.get_ldap_conn('ldap://127.0.0.1')
dn = 'cn=root,dc=hvcc,dc=edu'
pw = hll.get_rootdnpw()
hll.ldap_bind_conn(conn, dn, pw)
#
# Add list
#
if ( dl == 'mm' ):
hll.list_add(conn, lname, False)
else:
hll.list_add(conn, lname, True)