I've just started testing my ks.cfg and was kind of stumped when alot of my options used in 2.5.x didn't work with 3.0.x. It seems that VMware is pushing everything towards the GUI and their isn't much to do with the CLI after install.
So I was wondering what everyone else was placing in their %post section? Or if you are using an "after-install" cleanup script, what kinds of things you're doing with that?
After starting over, I basically have the firewall and time configs in the %post section as well as adding additional nameservers for starters.
Not sure about the special characters BUT you can change the root logon a slightly different way and not use the #
setSSHRoot()
{
echo "Allowing root to login via SSH..." >> /root/PostInstall/PostInstall.log
mv /etc/ssh/sshd_config /etc/ssh/sshd_config.old
sed -e "s/PermitRootLogin no/PermitRootLogin yes/g" /etc/ssh/sshd_config.old > /etc/ssh/sshd_config
rm -f /etc/ssh/sshd_config.old
/etc/init.d/ sshd restart
echo "$scriptName - Set root to login via SSH" >> /root/PostInstall/PostInstall.log
}
Thanks Steve, the new version of the Service Console memory bump worked. Would it be possible for you to incoporate the changes you made into your original script way up above so that it works properly? That is a very nice collection of scripts, handy for others to use.
I'll continue to work on the bashrc prompt update script. Maybe I can figure it out eventually. There are lots of resources on the net for sed
Jas
I updated the post to reflect the change so it should work now
In a different file, I need the only existing instance of this:
\u@\h \W
changed to this:
\u@\h \w
\^^^^ notice the only change is the case of the W to w
Got it!
#Modification to display full path in COS bash prompt:
#Jason Boche
mv /etc/bashrc /etc/bashrc.old
sed -e "s/
h
\W/
h
\w/g" /etc/bashrc.old > /etc/bashrc
Thanks again Steve.
Hey what are you doing here with this path in the COS?
Let's say you're on the COS and you cd /etc/vmware/firewall
The default prompt will show:
\[root@vader firewall]#
After the scripted change, the prompt will show the full path of the directory you're in which I prefer (I'm an old DOS guy):
\[root@vader /etc/vmware/firewall]#
Nice one!! Good to know!!
Nice addition!
hello
bit of a n00b question on your script. What does the # symbol do when you are piping to your PostInstall.log file i.e. the #>> instead of just >>
e.g.
echo "Setting Service Console memory to 512MB" #>> /root/PostInstall/PostInstall.log
That comments the next steps out so the command would not pipe it to log file. If you remove the # it will pipe the output to the file listed