Last active
November 4, 2019 19:38
-
-
Save goneri/25d4460162136545d0b8faea48940ef3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -eux | |
systemctl stop multi-user.target | |
systemctl stop applmgmt | |
systemctl stop getty@tty1.service | |
systemctl stop getty@tty2.service | |
systemctl stop vami-lighttp | |
systemctl stop dnsmasq | |
systemctl stop vmafdd | |
systemctl stop vmcad | |
systemctl stop vmdird | |
systemctl stop vmdnsd | |
systemctl stop vmtoolsd | |
systemctl stop vmware-firewall | |
systemctl stop vmware-pod | |
systemctl stop xinetd | |
systemctl stop vmware-vpxd | |
systemctl stop vmware-stsd | |
systemctl stop vmware-sts-idmd | |
systemctl stop vmware-vmon | |
systemctl stop syslog | |
systemctl stop syslog.socket | |
pkill -f '/usr/bin/python /usr/lib/applmgmt/ddns/py/ddns.py' || true | |
for mount_point in $(mount|awk '/mapper/ { print $3 }'); do | |
echo $mount_point | |
if ! test -d ${mount_point}.new; then | |
cp -Rvpa ${mount_point} ${mount_point}.new | |
fi | |
umount ${mount_point} | |
rm -r ${mount_point} | |
mv -f ${mount_point}.new ${mount_point} | |
done | |
cp -v /etc/fstab /etc/fstab.save | |
echo ' | |
/dev/vda3 / ext4 defaults 1 1 | |
/dev/vda2 swap swap defaults 0 0 | |
/dev/vda1 /boot ext4 defaults,nosuid,noacl,nodev,noexec 1 2 | |
/dev/cdrom /mnt/cdrom iso9660 ro,noauto,nosuid,nodev 0 0' > /etc/fstab | |
echo ' | |
[Match] | |
Name=eth0 | |
[Network] | |
DHCP=yes | |
[DHCP] | |
UseDNS=yes | |
' > /etc/systemd/network/10-eth0.network | |
echo ' | |
[Resolve] | |
LLMNR=false | |
' > /etc/systemd/resolved.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
curl -k --user 'root:!234AaAa56' -o vCenterServerAppliance.raw 'https://192.168.123.5/folder/vCenter%2dServer%2dAppliance/vCenter%2dServer%2dAppliance%2dflat%2evmdk?dcPath=ha%252ddatacenter&dsName=local'