From 42369d4899ed5e56bd9a0cf1752c3ceb223cab80 Mon Sep 17 00:00:00 2001 From: Rich Megginson Date: Mon, 8 Jun 2015 16:22:27 -0600 Subject: [PATCH] ipsilon-client-install give password in env. var. https://fedorahosted.org/ipsilon/ticket/142 If --admin-password is not given, see if the IPSILON_ADMIN_PASSWORD environment variable is set, and use it for the admin_password, before doing getpass(). Signed-off-by: Rich Megginson Reviewed-by: Patrick Uiterwijk --- ipsilon/install/ipsilon-client-install | 3 +++ man/ipsilon-client-install.1 | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ipsilon/install/ipsilon-client-install b/ipsilon/install/ipsilon-client-install index 78dfb51..09af718 100755 --- a/ipsilon/install/ipsilon-client-install +++ b/ipsilon/install/ipsilon-client-install @@ -115,6 +115,9 @@ def saml2(): logger.error("Failed to read password file!\n" + "Error: [%s]" % e) raise + elif ('IPSILON_ADMIN_PASSWORD' in os.environ) and \ + (os.environ['IPSILON_ADMIN_PASSWORD']): + admin_password = os.environ['IPSILON_ADMIN_PASSWORD'] else: admin_password = getpass.getpass('%s password: ' % args['admin_user']) diff --git a/man/ipsilon-client-install.1 b/man/ipsilon-client-install.1 index 81fdb3e..886fb48 100644 --- a/man/ipsilon-client-install.1 +++ b/man/ipsilon-client-install.1 @@ -26,7 +26,7 @@ Port number that SP listens on. The default is to not set a specific listen port Account allowed to create a Service Provider (SP). The default is admin. .TP \fB\-\-admin\-password\fR \fIADMIN_PASSWORD\fR -File containing the password for the account used toc reate a SP (\- to read from stdin) +File containing the password for the account used to create a SP (\- to read from stdin). You can also provide the password in the IPSILON_ADMIN_PASSWORD environment variable. .TP \fB\-\-httpd\-user\fR \fIHTTPD_USER\fR Web server account used. Some files created by the installation will be chown(1) to this user. The default is apache. -- 2.20.1