/usr/sbin/upgradednformat is in 389-ds-base 1.3.2.16-0ubuntu1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | #!/bin/sh
. /usr/share/dirsrv/data/DSSharedLib
# upgradednformat -- upgrade DN format to the new style (RFC 4514)
# Usgae: upgradednformat [-N] -n backend_instance -a db_instance_directory
# -N: dryrun
# exit code: 0 -- needs upgrade; 1 -- no need to upgrade; -1 -- error
# -n backend_instance -- instance name to be examined or upgraded
# -a db_instance_directory -- full path to the db instance dir
# e.g., /var/lib/dirsrv/slapd-ID/db/userRoot
libpath_add "/usr/lib/x86_64-linux-gnu/dirsrv/"
libpath_add ""
libpath_add "/usr/lib/x86_64-linux-gnu"
libpath_add ""
export LD_LIBRARY_PATH
SHLIB_PATH=$LD_LIBRARY_PATH
export SHLIB_PATH
usage ()
{
echo "Usage: upgradednformat -n backendname -a database_directory [-Z serverID] [-N] [-h]"
echo "Options:"
echo " -n backendname - Backend name"
echo " -a database_directory - Path to database directory"
echo " -Z serverID - Server instance identifier"
echo " -N - Only checks if database has any DNs that need to be upgraded"
echo " -h - Display usage"
}
while getopts "vhd:a:n:D:NZ:" flag
do
case $flag in
Z) servid=$OPTARG;;
v) args=$args" -v";;
N) args=$args" -N";;
d) args=$args" -d $OPTARG";;
a) args=$args" -a $OPTARG"
dir="set";;
n) args=$args" -n $OPTARG"
be="set";;
h) usage
exit 0;;
D) args=$args" -D $OPTARG";;
?) usage
exit 1;;
esac
done
if [ "$be" = "" ] || [ "$dir" = "" ]; then
usage
exit 1
fi
initfile=$(get_init_file "/etc/default" $servid)
if [ $? == 1 ]
then
usage
echo "You must supply a valid server instance identifier. Use -Z to specify instance name"
echo "Available instances: $initfile"
exit 1
fi
. $initfile
/usr/sbin/ns-slapd upgradednformat -D $CONFIG_DIR $args
rc=$?
exit $rc
|