From 6b0587726aa69cb1f4b1f983b4551bcd61440c1b Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Fri, 19 Oct 2007 09:59:07 -0400 Subject: [PATCH] Actually return a value to the shell --- ipa-admintools/ipa-addgroup | 3 ++- ipa-admintools/ipa-adduser | 3 ++- ipa-admintools/ipa-delgroup | 3 ++- ipa-admintools/ipa-deluser | 3 ++- ipa-admintools/ipa-findgroup | 3 ++- ipa-admintools/ipa-finduser | 3 ++- ipa-admintools/ipa-groupmod | 3 ++- ipa-admintools/ipa-passwd | 3 ++- ipa-admintools/ipa-usermod | 3 ++- 9 files changed, 18 insertions(+), 9 deletions(-) diff --git a/ipa-admintools/ipa-addgroup b/ipa-admintools/ipa-addgroup index ba1a0999d..97dfd5f7b 100644 --- a/ipa-admintools/ipa-addgroup +++ b/ipa-admintools/ipa-addgroup @@ -110,4 +110,5 @@ def main(): return 0 -main() +if __name__ == "__main__": + sys.exit(main()) diff --git a/ipa-admintools/ipa-adduser b/ipa-admintools/ipa-adduser index 8bca98d7e..d82de8955 100644 --- a/ipa-admintools/ipa-adduser +++ b/ipa-admintools/ipa-adduser @@ -246,4 +246,5 @@ def main(): print username + " successfully added" return 0 -main() +if __name__ == "__main__": + sys.exit(main()) diff --git a/ipa-admintools/ipa-delgroup b/ipa-admintools/ipa-delgroup index c10e7125b..08ea73771 100644 --- a/ipa-admintools/ipa-delgroup +++ b/ipa-admintools/ipa-delgroup @@ -69,4 +69,5 @@ def main(): return 0 -main() +if __name__ == "__main__": + sys.exit(main()) diff --git a/ipa-admintools/ipa-deluser b/ipa-admintools/ipa-deluser index 659c3869e..18adf75c0 100644 --- a/ipa-admintools/ipa-deluser +++ b/ipa-admintools/ipa-deluser @@ -69,4 +69,5 @@ def main(): return 0 -main() +if __name__ == "__main__": + sys.exit(main()) diff --git a/ipa-admintools/ipa-findgroup b/ipa-admintools/ipa-findgroup index 94a88979d..9e87a8a5c 100644 --- a/ipa-admintools/ipa-findgroup +++ b/ipa-admintools/ipa-findgroup @@ -87,4 +87,5 @@ def main(): return 0 -main() +if __name__ == "__main__": + sys.exit(main()) diff --git a/ipa-admintools/ipa-finduser b/ipa-admintools/ipa-finduser index acbaf44b8..3396ce45d 100644 --- a/ipa-admintools/ipa-finduser +++ b/ipa-admintools/ipa-finduser @@ -120,4 +120,5 @@ def main(): return 0 -main() +if __name__ == "__main__": + sys.exit(main()) diff --git a/ipa-admintools/ipa-groupmod b/ipa-admintools/ipa-groupmod index 60fadd48f..4d8dd4d5e 100644 --- a/ipa-admintools/ipa-groupmod +++ b/ipa-admintools/ipa-groupmod @@ -108,4 +108,5 @@ def main(): return 0 -main() +if __name__ == "__main__": + sys.exit(main()) diff --git a/ipa-admintools/ipa-passwd b/ipa-admintools/ipa-passwd index 4db0838fe..59d30e2e4 100644 --- a/ipa-admintools/ipa-passwd +++ b/ipa-admintools/ipa-passwd @@ -104,4 +104,5 @@ def main(): return 0 -main() +if __name__ == "__main__": + sys.exit(main()) diff --git a/ipa-admintools/ipa-usermod b/ipa-admintools/ipa-usermod index d193b2c1f..57f20b410 100644 --- a/ipa-admintools/ipa-usermod +++ b/ipa-admintools/ipa-usermod @@ -207,4 +207,5 @@ def main(): print username + " successfully updated" return 0 -main() +if __name__ == "__main__": + sys.exit(main())