usim

View Ticket
Login
Ticket Hash: b7e146e7989c92b2a46b07a36ce6f285fbaa9280
Title: support a %myname% like variable in usim.ini
Status: Open Type: Feature_Request
Severity: Minor Priority: Immediate
Subsystem: Resolution: Open
Last Modified: 2023-05-02 11:20:09
Version Found In:
User Comments:
ams added on 2022-12-02 13:00:15:

It would be nice if usim.ini could support something like a %myname% variable; so that one could write:

[disks]
   disk0_filename = disk_%myname%.img

And have it expand based on whatever the value of chaos.myname is. Then also have a -n FOO option to usim proper that can set chaos.myname accordingly.

This would allow reusing the same config for multiple instances easily without having to make a bunch of usim.ini files for each machine.


ams added on 2023-05-02 11:20:09:

Might be better to do this using M4; then one could also support things like "%include foo" kind of directives. Which would be useful if one has a site, with multiple hosts, e.g, usim-ams-lm1.ini:

%include usim-amssite.ini
[chaos]
myname = AMS-LISPM-1
servername = AMS-FILECOMPUTER

And where, usim-amssite.ini might contain:

[usim]
sys_directory = ../sys
state_filename = usim-%myname%.state

[ucode]
prommcr_filename = ../sys/ubin/promh.mcr
promsym_filename = ../sys/ubin/promh.sym
mcrsym_filename = ../sys/ubin/ucadr.sym

[chaos]
hosts = ../sys/amssite/hosts.text

[disk]
disk0_filename = disk-%myname%.img