Mar
8
Probably most of you already had to log in the VMWare console to reinstall vmware tools after kernel update.
Usually we do that by simply running:
/usr/bin/vmware-config-tools.pl
After doing it few times I’ve decided to find an automated way of doing it. After quick search on Internet I found an article giving acceptable solution to my problem.
I’ll share the solution here (with two small fixes 😉 as bonus).
– Open terminal and create new file
vi /etc/init.d/vmware-check-tools
– Paste following inside:
#!/bin/bash
# Following lines auto-recompile VM Tools when kernel updated
VMToolsCheckFile="/lib/modules/`uname -r`/misc/.vmware_installed"
VMToolsVersion=`vmware-config-tools.pl --help 2>&1 | awk '$0 ~ /^VMware Tools [0-9]/ { print $3,$4 }'`
printf "\nCurrent VM Tools version: $VMToolsVersion\n\n"
if [[ ! -e $VMToolsCheckFile || `grep -c "$VMToolsVersion" $VMToolsCheckFile` -eq 0 ]]; then
[ -x /usr/bin/vmware-config-tools.pl ] && \
printf "Automatically compiling new build of VMware Tools\n\n" && \
/usr/bin/vmware-config-tools.pl --default && \
printf "$VMToolsVersion" > $VMToolsCheckFile && \
rmmod pcnet32
rmmod vmxnet
depmod -a
modprobe vmxnet
fi
Then make it executable:
chmod 755 /etc/init.d/vmware-check-tools
And finally create symlink:
cd /etc/rc.d/rc3.d
ln -s ../init.d/vmware-check-tools S09vmware-check-tools
Mar
6
Upgrade Shorewall from 4.4.x to 4.5.x
Filed Under Linux | Leave a Comment
Recently Shorewall (Shoreline Firewall) released new version 4.5.0.
This version introduced new packing. From this version you have follwoing packages:
- Shorewall Core – Core libraries installed in /usr/share/shorewall/
- Shorewall – Requires Shorewall Core. Together with Shorewall Core, provides IPv4 firewalling.
- Shorewall6 – Requires Shorewall. Provides IPv6 firewalling.
- Shorewall Lite – Requires Shorewall Core. As before.
- Shorewall6 Lite – Requires Shorewall Core. As before.
- Shorewall Init – As before.
Since we have Core package now to upgrade from 4.4.x version you need to update at least 2 packages – core and shorewall.
To do that in CentOS 5 the spteps are follwoing (in your case probably versions will be different):
1. Download new packages
wget http://www.invoca.ch/pub/packages/shorewall/RPMS/ils-5/noarch/shorewall-4.5.0.2-1.el5.noarch.rpm http://www.invoca.ch/pub/packages/shorewall/RPMS/ils-5/noarch/shorewall-core-4.5.0.2-1.el5.noarch.rpm.
2. Upgrade shorewall
rpm -Uvh shorewall-core-4.5.0.2-1.el5.noarch.rpm shorewall-4.5.0.2-1.el5.noarch.rpm
error: Failed dependencies:
perl(Digest::SHA1) is needed by shorewall-4.5.0.2-1.el5.noarch
In my case additional package was required so I have to install it:
yum install perl-Digest-SHA1
and update again
3. Check configuration
shorewall check
4. Restart shorewall
shorewall restart