I know that we're supposed to treat the VIO server like an appliance. We're supposed to set it up and let it run. But in this instance, we were still in the middle of setup. We were mapping LUNs to different vhost adapters for different clients, and we were going into oem_setup_env to install additional drivers.
Often I see customers set up their .profile with things like set –o vi, or customize their prompts with things like the user ID they're logged in with, their current working directory, their hostname, etc.
While you can certainly make changes to the /home/padmin/.profile file, they will usually go away whenever you upgrade your VIO server. That's fine; since we're supposed to treat it like an appliance, I understand that we shouldn't change things. In reality though, I continually find customers who alter the padmin .profile.
Even when customers change the .profile, those changes don't carry over when running the oem_setup_env command. For the sake of usability, something had to give in this case. Whenever we ran the oem_setup_env command, we had to run manually run /.profile. This customer was getting fed up.
After asking around for a more elegant solution, someone reminded me to just use a .kshrc file.
I was told to create a /home/padmin/.kshrc file. I put set –o vi and my other desired prompt settings into that file. Then at the end of the /home/padmin/.profile, I added:
This allowed the customer's desired environment to be set up automatically when he logged in as padmin. Then when he switched over to root by running the oem_setup_env command, that was set up as he wanted it.
Yes, I realize that .profile and .kshrc will have to be revisited when this customer upgrades his VIO server. But in the meantime, this technique allowed us to customize the environment to his liking. It helped me keep a customer happy. Maybe it will make you happy as well.