Closed citrus-it closed 10 months ago
Thanks @citrus-it.
Depending on whether one is in the global zone or the switch zone, ddmadm
shows up in different places. In the gz it's at /opt/oxide/mg-ddm/ddmadm
and in the switch zone it's /opt/oxide/mg-ddm/bin/ddmadm
. I suspect for the switch zone, we'd need to handle setting PATH
in the files that comprise the zone itself. But just thought I'd mention that if it can somehow be addressed here.
We should already be fine in the switch zone because root's profile there comes from https://github.com/oxidecomputer/omicron/blob/main/smf/profile/profile which sets the path correctly based on the zone type (that came in with the Christmas Edition prompt change a few weeks back).
root@oxz_switch0:~# echo $PATH
/usr/sbin:/sbin:/usr/bin:/opt/ooce/bin:/opt/oxide/bin:/opt/oxide/dendrite/bin:/opt/oxide/mg-ddm/bin
Currently the global zone's profile/bashrc on a gimlet comes from this repository, so this change addresses the GZ until such time as sled-agent may take responsibility for these files (or we disable logins entirely and it becomes irrelevant).
I verified that
/opt/local
wasn't present on either my local helios box or the GZ on dogfood, so I'm assuming that part is just cleanup?
Yes, /opt/local
is where packages from pkgsrc
end up, and we don't use that in the gimlet images.
There was an attempt to do this in the omicron OS image builder, by adding a .profile in the overlay root but that file is not processed when
.bash_profile
is present. Eventually perhaps sled agent should take control of root's environment, replacing whatever is in the image, but in the meantime it would be useful foropteadm
andddmadm
to be in the GZ root's path.This template file is only used by the gimlet image as far as I can see.