From: Frank Brehm Date: Tue, 30 Oct 2018 10:52:58 +0000 (+0100) Subject: Bugfixing bin/postinst X-Git-Tag: 0.3.2^2~18 X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=5f160697df1f88b60f1ff27fe9528232cf766b33;p=pixelpark%2Fcreate-vmware-tpl.git Bugfixing bin/postinst --- diff --git a/bin/postinst b/bin/postinst index f68a36b..3742e94 100644 --- a/bin/postinst +++ b/bin/postinst @@ -14,6 +14,10 @@ IP_ADDRESS_ETH0=$( host "${hostname}" | sed -e 's/.*has address[ ][ ]*//' ) DOMAIN=$( echo "${hostname}" | cut -d. -f2,3 ) SIMPLE_HOSTNAME=$( echo "${hostname}" | cut -d. -f1 ) +if [[ -z "${ip_address_eth0}" ]] ; then + ip_address_eth0="${IP_ADDRESS_ETH0}" +fi + ROOT_PW_CRYPTED="\$6\$I0yXrNsT\$YU3ekjNLy1KTWLRVNww8YM1xtO8FXgTEFhOANS.HB8baj7CxNMRCoxDQh5oFYkZbli67s4pwZ36aNchD2YL.G0" GIT_ACCOUNT="vmware-provisioning" @@ -197,6 +201,10 @@ install_network() { mv -v /etc/sysconfig/network "/etc/sysconfig/network.orig.$( date -r /etc/sysconfig/network +'%Y-%m-%d_%H:%M:%S' )" mv -v "${tmp_nw_cfg}" /etc/sysconfig/network + echo "Generated /etc/sysconfig/network:" + cat /etc/sysconfig/network || true + echo + # Also set the hostname now, some applications require it /bin/hostname "${hostname}" @@ -230,9 +238,12 @@ install_network() { mv -v "${ifcfg_file}" "${old_dir}" done mv -v "${dev_file}" "${nw_script_dir}" - rm -vrf "${temp_dir}" + echo "Generated ${nw_script_dir}/ifcfg-eth0:" + cat "${nw_script_dir}/ifcfg-eth0" || true + echo + } #-----------------------------------------------------------