summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNalin Dahyabhai <nalin.dahyabhai@pobox.com>2008-08-06 19:28:29 -0400
committerNalin Dahyabhai <nalin.dahyabhai@pobox.com>2008-08-06 19:28:29 -0400
commitb91ea2d7942576005e0507d6e5763bf4fc43f491 (patch)
tree2ff6e028cd7cd726dcca1030558603c7e5d1c6c7
parentcfe4ec701af66b3c2d1d899f01070270e6bd6065 (diff)
downloadslapi-nis-b91ea2d7942576005e0507d6e5763bf4fc43f491.tar.gz
slapi-nis-b91ea2d7942576005e0507d6e5763bf4fc43f491.tar.xz
slapi-nis-b91ea2d7942576005e0507d6e5763bf4fc43f491.zip
- fix --just-containers
-rwxr-xr-xdoc/migrate-nis.sh20
1 files changed, 12 insertions, 8 deletions
diff --git a/doc/migrate-nis.sh b/doc/migrate-nis.sh
index 14d68bc..d8dcb63 100755
--- a/doc/migrate-nis.sh
+++ b/doc/migrate-nis.sh
@@ -12,7 +12,7 @@ mergegroups=true
maps=
automap=false
help=false
-mail=
+email=false
containers=false
entries=true
@@ -71,7 +71,7 @@ migrate_passwd() {
${userpassword:+userPassword: "{CRYPT}"$userpassword}
${loginshell:+loginShell: $loginshell}
EOF
- if $rfc2307bis || $ipa ; then
+ if $rfc2307bis || $ipa || $email ; then
grep -v '^$' <<- EOF
objectClass: inetOrgPerson
objectClass: inetUser
@@ -80,6 +80,7 @@ migrate_passwd() {
cn: ${cn:-$uid}
sn: ${sn:-$uid}
givenName: ${givenname:-$uid}
+ mail: ${uid}@${domain}
EOF
fi
if $ipa ; then
@@ -226,16 +227,16 @@ get_map() {
migrate_map() {
case "$1" in
passwd*)
- $entries && (get_map "$1" || echo) | migrate_passwd
+ (get_map "$1" || echo) | migrate_passwd
;;
group*)
- $entries && (get_map "$1" || echo) | migrate_group
+ (get_map "$1" || echo) | migrate_group
;;
auto.*|auto_*)
- $entries && (get_map "$1" || echo) | migrate_automount "$1"
+ (get_map "$1" || echo) | migrate_automount "$1"
;;
*)
- $entries && (get_map "$1" || echo) | migrate_nis "$1"
+ (get_map "$1" || echo) | migrate_nis "$1"
;;
esac
}
@@ -290,6 +291,9 @@ while test $# -gt 0 ; do
--ipa)
ipa=true
;;
+ --email)
+ email=true
+ ;;
--realm=*)
realm=`echo "$1" | cut -f2- -d= | tr '[a-z]' '[A-Z]'`
automap=false
@@ -319,10 +323,10 @@ while test $# -gt 0 ; do
shift
done
-if $automap && test "$maps" = "" ; then
+if $automap && test -z "$maps" ; then
maps=`./ypmaplist.py`
fi
-if $help || test "$maps" = "" ; then
+if $help || test -z "$maps" ; then
echo `basename $0`: create LDIF from NIS maps
echo Usage: `basename $0` "[options] [mapname [...]]"
cat <<- EOF