MVS-sysgen/sysgen

Specifying argument --users my-users.conf doesn't behave as expected

Closed this issue · 0 comments

Hi, @mainframed. I think I found a minor bug in sysgen.py and have included a quick fix. (Pull request to follow shortly.)

When specifying a different users.conf on the command line, i.e. ./sysgen.py --users my-users.conf, I noticed that on step 7 when adding TSO users, users.conf is read, ignoring the argument to override the default. However, on step 8 when adding the RAKF users, my-users.conf is used as expected.

Below is an excerpt of a recent invocation where I ran ./sysgen.py --users my-users.conf.

[+] [15:28:04] Step 7. Customizing MVS 3.8j
[+] [15:28:04] Removing no longer needed dasd MVSCE/DASD/start1.3330
[+] [15:28:04] Removing no longer needed dasd MVSCE/DASD/spool0.3330
... removed a few lines ...
[+] [15:32:05] Adding users from users.conf
[+] [15:32:06] Adding user IBMUSER
[+] [15:32:15] Adding user MVSCE01
[+] [15:32:17] Adding user MVSCE02
[+] [15:33:24] Installing BREXX/370
[+] [15:33:55] Customization Complete
[+] [15:33:55] Step 8. Installing RAKF
[+] [15:33:55] Getting current RAKF release from github
[+] [15:33:58] Generating temp/RAKF/rakf_install.jcl
[+] [15:33:58] Adding RAKF user: IBMUSER
[+] [15:33:58] Adding RAKF user: MVSCE01
[+] [15:33:58] Adding RAKF user: MVSCE02
[+] [15:33:58] Adding RAKF user: MYUSER1
[+] [15:33:58] Adding RAKF user: MYUSER2
[+] [15:33:58] Installing RAKF Release

my-users.conf contents below:

IBMUSER SYS1   IKJACCNT OPER   ACCT   JCL MOUNT   ADMIN
MVSCE01 CUL8TR IKJACCNT OPER   ACCT   JCL NOMOUNT ADMIN
MVSCE02 PASS4U IKJACCNT NOOPER NOACCT JCL NOMOUNT NOADMIN
MYUSER1 SYS1   IKJACCNT OPER   ACCT   JCL NOMOUNT ADMIN
MYUSER2 PASS4U IKJACCNT NOOPER NOACCT JCL NOMOUNT NOADMIN

In the current version of sysgen.py, for step 7 on line 1696, noted that it is it is opening users.conf as a hardcoded string. I suspect that this should be changed to the variable self.users as used in step 8, line 1757. I've tested the change and it appears to produce the correct behavior.