Skip to content

Commit

Permalink
Issue 6041 - dscreate ds-root - accepts relative path (#6042)
Browse files Browse the repository at this point in the history
Bug Description: When dscreate ds-root is invoked with a relative path to
root_dir, the relative path is written to defaults.inf, causing instance
creation failure.

Fix Description: Use abs path when writing root_dir to defaults.inf

Fixes: #6041

Reviewed by: @progier389, @droideck (Thank you)
  • Loading branch information
jchapma committed Jan 22, 2024
1 parent 9e595d4 commit 13f5a6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib389/lib389/cli_ctl/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def write(self, fout):
PO = '{'
PF = '}'
copy_and_substitute('/usr/share/dirsrv/inf/defaults.inf', (
('WORD', ' /', f' {args.root_dir}/'),
('WORD', ' /', f' {os.path.abspath(args.root_dir)}/'),
('LINE', 'with_selinux', 'no'),
('LINE', 'with_systemd', '0'),
('LINE', 'user', user),
Expand Down

0 comments on commit 13f5a6a

Please sign in to comment.