]> Frank Brehm's Git Trees - pixelpark/create-vmware-tpl.git/commitdiff
Implementing install_openvm_tools and dist_upgrade in bin/postinst
authorFrank Brehm <frank.brehm@pixelpark.com>
Wed, 28 Mar 2018 14:28:57 +0000 (16:28 +0200)
committerFrank Brehm <frank.brehm@pixelpark.com>
Wed, 28 Mar 2018 14:28:57 +0000 (16:28 +0200)
bin/postinst

index fb39e04f1bd6d98dd013e204f14a9798bc7c8134..f2e1b48d42a58bc251487895c2df68a7364dad1f 100644 (file)
@@ -354,6 +354,10 @@ make_pp_dirs() {
 misc_packages() {
 
     local misc_pkgs="ksh tmux vim telnet curl"
+    local misc_pkgs_remove="deltarpm nfs* rpcbind abrt*"
+
+    echo "Disabling mysql-community in /etc/yum.conf ..."
+    echo "exclude=mysql-community*" >> /etc/yum.conf
 
     echo
     log "Installing NetworkManager ..."
@@ -376,6 +380,14 @@ misc_packages() {
     log "Installing packages: ${misc_pkgs}"
     yum install -y ${misc_pkgs}
 
+    echo
+    log "Removing packages mysql-community* ..."
+    yum remove -y mysql-community*
+
+    echo
+    log "Removing packages: ${misc_pkgs_remove}"
+    yum remove -y ${misc_pkgs_remove}
+
 }
 
 #-----------------------------------------------------------
@@ -459,6 +471,32 @@ install_ntp() {
 
 }
 
+#-----------------------------------------------------------
+install_openvm_tools() {
+
+    echo
+    log "Installing open-vm-tools ..."
+
+    yum install -y open-vm-tools
+
+    echo "Enabling vmware-tools and vmtoolsd ..."
+    systemctl enable vmware-tools
+    systemctl enable vmtoolsd
+
+    vmware-toolbox-cmd timesync disable
+
+}
+
+#-----------------------------------------------------------
+dist_upgrade() {
+
+    echo
+    log "Upgrading all packages ..."
+    echo
+    yum upgrade -y
+
+}
+
 #-----------------------------------------------------------
 main() {
 
@@ -477,6 +515,8 @@ main() {
     create_motd
     install_legato_networker
     install_ntp
+    install_openvm_tools
+    dist_upgrade
 
     tweak_grub