]> Frank Brehm's Git Trees - pixelpark/create-vmware-tpl.git/commitdiff
Disabling floppy in bin/postinst
authorFrank Brehm <frank.brehm@pixelpark.com>
Thu, 29 Mar 2018 12:05:45 +0000 (14:05 +0200)
committerFrank Brehm <frank.brehm@pixelpark.com>
Thu, 29 Mar 2018 12:05:45 +0000 (14:05 +0200)
bin/postinst

index 9bb0108a6ec3345cf2a7eb6f54dc7aa03e436f04..92c2815902b59d24dd2fbd5ce4327801af15a5f2 100644 (file)
@@ -14,6 +14,8 @@ IP_ADDRESS_ETH0=$( host "${hostname}" | sed -e 's/.*has address[      ][      ]*//' )
 DOMAIN=$( echo "${hostname}" | cut -d. -f2,3 )
 SIMPLE_HOSTNAME=$( echo "${hostname}" | cut -d. -f1 )
 
+ROOT_PW_CRYPTED="$6$I0yXrNsT$YU3ekjNLy1KTWLRVNww8YM1xtO8FXgTEFhOANS.HB8baj7CxNMRCoxDQh5oFYkZbli67s4pwZ36aNchD2YL.G0"
+
 echo
 echo "Some information:"
 echo "  \$hostname:             $hostname"
@@ -605,6 +607,27 @@ install_puppet() {
 
 }
 
+#-----------------------------------------------------------
+disable_floppy() {
+
+    echo
+    log "Disabling floppy kernel module ..."
+
+    cat <<-EOF >"/etc/modprobe.d/local-blacklist.conf"
+       blacklist floppy
+       EOF
+
+}
+
+#-----------------------------------------------------------
+set_root_pw() {
+
+    echo
+    log "Setting root password ..."
+    usermod -p "${ROOT_PW_CRYPTED}" root
+
+}
+
 #-----------------------------------------------------------
 main() {
 
@@ -625,6 +648,8 @@ main() {
     install_ntp
     install_openvm_tools
     remove_uek_packages
+    disable_floppy
+    set_root_pw
     dist_upgrade
     install_puppet