mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2024-12-24 16:10:02 -06:00
Add option to ipa-client-install to configure automount
Add the --automount-location option to ipa-client-install. If the option is used, ipa-client-automount is called at the end of ipa-client-install. https://fedorahosted.org/freeipa/ticket/3740
This commit is contained in:
parent
f312d72510
commit
95483d3b9f
@ -148,6 +148,8 @@ def parse_options():
|
||||
# only, it isn't meant to be used on clients.
|
||||
basic_group.add_option("--on-master", dest="on_master", action="store_true",
|
||||
help=SUPPRESS_HELP, default=False)
|
||||
basic_group.add_option("--automount-location", dest="location",
|
||||
help="Automount location")
|
||||
parser.add_option_group(basic_group)
|
||||
|
||||
sssd_group = OptionGroup(parser, "SSSD options")
|
||||
@ -1288,6 +1290,28 @@ def configure_sshd_config(fstore, options):
|
||||
except Exception, e:
|
||||
log_service_error(sshd.service_name, 'restart', e)
|
||||
|
||||
|
||||
def configure_automount(options):
|
||||
root_logger.info('\nConfiguring automount:')
|
||||
|
||||
args = [
|
||||
'ipa-client-automount', '--debug', '-U',
|
||||
'--location', options.location
|
||||
]
|
||||
|
||||
if options.server:
|
||||
args.extend(['--server', options.server[0]])
|
||||
if not options.sssd:
|
||||
args.append('--no-sssd')
|
||||
|
||||
try:
|
||||
stdout, _, _ = run(args)
|
||||
except Exception, e:
|
||||
root_logger.error('Automount configuration failed: %s', str(e))
|
||||
else:
|
||||
root_logger.info(stdout)
|
||||
|
||||
|
||||
def resolve_ipaddress(server):
|
||||
""" Connect to the server's LDAP port in order to determine what ip
|
||||
address this machine uses as "public" ip (relative to the server).
|
||||
@ -2515,6 +2539,9 @@ def install(options, env, fstore, statestore):
|
||||
if options.conf_sshd:
|
||||
configure_sshd_config(fstore, options)
|
||||
|
||||
if options.location:
|
||||
configure_automount(options)
|
||||
|
||||
root_logger.info('Client configuration complete.')
|
||||
|
||||
return 0
|
||||
|
@ -146,13 +146,17 @@ Print debugging information to stdout
|
||||
\fB\-U\fR, \fB\-\-unattended\fR
|
||||
Unattended installation. The user will not be prompted.
|
||||
.TP
|
||||
\fB\-\-ca-cert-file\fR=\fICA_FILE\fR
|
||||
\fB\-\-ca\-cert\-file\fR=\fICA_FILE\fR
|
||||
Do not attempt to acquire the IPA CA certificate via automated means,
|
||||
instead use the CA certificate found locally in in \fICA_FILE\fR. The
|
||||
\fICA_FILE\fR must be an absolute path to a PEM formatted certificate
|
||||
file. The CA certificate found in \fICA_FILE\fR is considered
|
||||
authoritative and will be installed without checking to see if it's
|
||||
valid for the IPA domain.
|
||||
.TP
|
||||
\fB\-\-automount\-location\fR=\fILOCATION\fR
|
||||
Configure automount by running ipa\-client\-automount(1) with \fILOCATION\fR as
|
||||
automount location.
|
||||
|
||||
.SS "SSSD OPTIONS"
|
||||
.TP
|
||||
|
Loading…
Reference in New Issue
Block a user