| |
@@ -1252,9 +1252,10 @@
|
| |
return ("ldap://{}:{}".format(host, port), None)
|
| |
|
| |
|
| |
- def get_instance_list(prefix=None):
|
| |
+ def get_instance_list():
|
| |
# List all server instances
|
| |
- conf_dir = (prefix or "") + "/etc/dirsrv/"
|
| |
+ paths = Paths()
|
| |
+ conf_dir = os.path.join(paths.sysconf_dir, 'dirsrv')
|
| |
insts = []
|
| |
try:
|
| |
for inst in os.listdir(conf_dir):
|
| |
@@ -1262,6 +1263,9 @@
|
| |
insts.append(inst)
|
| |
except OSError as e:
|
| |
log.error("Failed to check directory: {} - {}".format(conf_dir, str(e)))
|
| |
+ except IOError as e:
|
| |
+ log.error(e)
|
| |
+ log.error("Perhaps you need to be a different user?")
|
| |
insts.sort()
|
| |
return insts
|
| |
|
| |
Bug Description: dsctl list was not coded to allow
using the paths module.
Fix Description: Change to the paths module to allow
better and consistent CLI handling.
https://pagure.io/389-ds-base/issue/50667
Author: William Brown william@blackhats.net.au
Review by: ???