From: Frank Brehm Date: Wed, 28 Mar 2018 14:10:31 +0000 (+0200) Subject: Implementing install_legato_networker, changing create_motd and install_epel in bin... X-Git-Tag: 0.1.1~76 X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=b645033fcbb98daa84b3c4170a076b0977952c5d;p=pixelpark%2Fcreate-vmware-tpl.git Implementing install_legato_networker, changing create_motd and install_epel in bin/postinst --- diff --git a/bin/postinst b/bin/postinst index b35ba7a..3b39fcc 100644 --- a/bin/postinst +++ b/bin/postinst @@ -277,10 +277,37 @@ install_epel() { echo log "Install EPEL repository package ..." - local url="${COBBLER_URL}/custom/epel/7/x86_64/epel-release-7-5.noarch.rpm" - echo "Using URL '${url}' ..." + local url= + local tgt= + + mkdir -pv /etc/yum.repos.d + + for bname in epel.repo epel-testing.repo puppet.repo rpm-repo.pixelpark.com.repo ; do + url="${COBBLER_URL}/custom/create-vmware-tpl/yum.repos/${bname}" + tgt="/etc/yum.repos.d/${bname}" + echo + echo "Retrieving '${url}' -> '${tgt}' ..." + wget -O "${tgt}" --dns-timeout=2 --connect-timeout=3 --read-timeout=3 "${url}" || true + chmod -v 0644 "${tgt}" + done + + mkdir -pv "/etc/pki/rpm-gpg" + chmod -v 0755 "/etc/pki" + chmod -v 0755 "/etc/pki/rpm-gpg" + + for bname in RPM-GPG-KEY-EPEL-7 RPM-GPG-KEY-pixelpark RPM-GPG-KEY-puppet-release ; do + url="${COBBLER_URL}/custom/create-vmware-tpl/yum.repos/${bname}" + tgt="/etc/pki/rpm-gpg/${bname}" + echo + echo "Retrieving '${url}' -> '${tgt}' ..." + wget -O "${tgt}" --dns-timeout=2 --connect-timeout=3 --read-timeout=3 "${url}" || true + chmod -v 0644 "${tgt}" + done + + #local url="${COBBLER_URL}/custom/epel/7/x86_64/epel-release-7-5.noarch.rpm" + #echo "Using URL '${url}' ..." - yum install -y "${url}" + #yum install -y "${url}" log "Updating YUM cache ..." yum makecache @@ -358,7 +385,33 @@ create_motd() { echo log "Creating initial /etc/motd ..." - wget -qO- "${url}" | ksh > /etc/motd + local mk_script=$( mktemp -p /tmp "mk_create_motd.XXXXXXXXXX.ksh" ) + wget -O "${mk_script}" --dns-timeout=2 --connect-timeout=3 --read-timeout=3 "${url}" + ksh "${mk_script}" -i 192.168.88.0/23 \ + -p "Template VM" \ + -l "L105 VMWare" \ + -h "VM x86_64" \ + -o "Pixelpark GmbH" > /etc/motd + rm -fv "${mk_script}" + +} + +#----------------------------------------------------------- +install_legato_networker() { + + local url_client="${COBBLER_URL}/custom/legato/lgtoclnt-latest.x86_64.rpm" + local url_man="${COBBLER_URL}/custom/legato/lgtoman-latest.x86_64.rpm" + + echo + log "Installing Legato networker client ..." + + echo "Installing from URL '${url_client}' ..." + yum install -y "${url_client}" + echo "Installing from URL '${url_man}' ..." + yum install -y "${url_man}" + + mkdir -pv /nsr/res + echo "legato01.pixelpark.com" > /nsr/res/servers } @@ -378,6 +431,7 @@ main() { make_pp_dirs misc_packages create_motd + install_legato_networker tweak_grub diff --git a/yum.repos/RPM-GPG-KEY-EPEL-7 b/yum.repos/RPM-GPG-KEY-EPEL-7 new file mode 100644 index 0000000..f205ede --- /dev/null +++ b/yum.repos/RPM-GPG-KEY-EPEL-7 @@ -0,0 +1,29 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.11 (GNU/Linux) + +mQINBFKuaIQBEAC1UphXwMqCAarPUH/ZsOFslabeTVO2pDk5YnO96f+rgZB7xArB +OSeQk7B90iqSJ85/c72OAn4OXYvT63gfCeXpJs5M7emXkPsNQWWSju99lW+AqSNm +jYWhmRlLRGl0OO7gIwj776dIXvcMNFlzSPj00N2xAqjMbjlnV2n2abAE5gq6VpqP +vFXVyfrVa/ualogDVmf6h2t4Rdpifq8qTHsHFU3xpCz+T6/dGWKGQ42ZQfTaLnDM +jToAsmY0AyevkIbX6iZVtzGvanYpPcWW4X0RDPcpqfFNZk643xI4lsZ+Y2Er9Yu5 +S/8x0ly+tmmIokaE0wwbdU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4/xqeON4 +vCPFU6OsT3lWQ8w7il5ohY95wmujfr6lk89kEzJdOTzcn7DBbUru33CQMGKZ3Evt +RjsC7FDbL017qxS+ZVA/HGkyfiu4cpgV8VUnbql5eAZ+1Ll6Dw== +=hdPa +-----END PGP PUBLIC KEY BLOCK----- diff --git a/yum.repos/RPM-GPG-KEY-pixelpark b/yum.repos/RPM-GPG-KEY-pixelpark new file mode 100644 index 0000000..c234617 --- /dev/null +++ b/yum.repos/RPM-GPG-KEY-pixelpark @@ -0,0 +1,52 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.14 (GNU/Linux) + +mQINBFKvK0cBEAC8gikSs1b4bw8+KD3iPgzk7s89UITPN1AXIdg41TISN+9UsJOm +8EQRXQWtrnV4Gj0ZFNU8/TjzjNwokKSEwJo4enZi5rqWaaBQkcHZFSm2YHiQu8HZ +2YsIouXV18K21XB08IAFI0i9WTVnYapMoGuF5prAJAdcS0zqvEjRU8pbQ4cJoM/a +1H3w+YTCB7hVp4/IPiuNosAASYoEdxOdvLhPjKcktEq0I+8gQkcSNXwJIcpaH7Pd +pIOOuI9/mQROcrh2xIl3TzDiuF3LtzzjRwrLiTQ/vIwNNvpDZH38YqFmWcBSMqQI +C724OEZtZ0V1F01yJs3QxuQJ70WYBhdh1iLgxP/exk1jDFKHBFB39uP2gphcDPot +OXre1qzUc0rtwtSAPkGvCC7qiy5umwmUpbC/wyE3c7XxK1oE82yrWDCukrD+aMkH +qZjJMNPVw06l1UHU3IW37vZJUcXxmY+UoIES/haBVgEjTpNjdgnxdHqMFpJBZ87h +ospOECselBfUWrXZbnSSxw2o2t9cp9k0ikA9mpzzeL9TmzQDN+krXCULUV4JI6jl +/qViNeaUewQerr7bVzXxwohq3iSARgiq9G0+y98V+Dxuk/TDhW6rktmO2nSOe07S +5usYODx6FZb4GTmgyobz3e1lVcyPJDSw6qScQB5PuMg3iq/prTLgoNAsxwARAQAB +tD1QaXhlbHBhcmsgQUcgKFBpeG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jTKXG8e6WIZfd7AVpMoYTRvkpKAa47zEvo5nqbZrxnWWEZVqDdBNBmM +Yva/JVlrZ8+TD4xX5n2K/j6uARUofSLK7zX+gsc7DJZBEkCILjhUOnWlHCQ9dSia +PBHUtX+5z65pq9FdMCrZV3nsT0G6MbWvWyajDA== +=FbHB +-----END PGP PUBLIC KEY BLOCK----- diff --git a/yum.repos/RPM-GPG-KEY-puppet-release b/yum.repos/RPM-GPG-KEY-puppet-release new file mode 100644 index 0000000..db53cb0 --- /dev/null +++ b/yum.repos/RPM-GPG-KEY-puppet-release @@ -0,0 +1,29 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQINBFe2Iz4BEADqbv/nWmR26bsivTDOLqrfBEvRu9kSfDMzYh9Bmik1A8Z036Eg +h5+TZD8Rrd5TErLQ6eZFmQXk9yKFoa9/C4aBjmsL/u0yeMmVb7/66i+x3eAYGLzV +FyunArjtefZyxq0B2mdRHE8kwl5XGl8015T5RGHCTEhpX14O9yigI7gtliRoZcl3 +hfXtedcvweOf9VrV+t5LF4PrZejom8VcB5CE2pdQ+23KZD48+Cx/sHSLHDtahOTQ +5HgwOLK7rBll8djFgIqP/UvhOqnZGIsg4MzTvWd/vwanocfY8BPwwodpX6rPUrD2 +aXPsaPeM3Q0juDnJT03c4i0jwCoYPg865sqBBrpOQyefxWD6UzGKYkZbaKeobrTB +xUKUlaz5agSK12j4N+cqVuZUBAWcokXLRrcftt55B8jz/Mwhx8kl6Qtrnzco9tBG +T5JN5vXMkETDjN/TqfB0D0OsLTYOp3jj4hpMpG377Q+6D71YuwfAsikfnpUtEBxe +NixXuKAIqrgG8trfODV+yYYWzfdM2vuuYiZW9pGAdm8ao+JalDZss3HL7oVYXSJp +MIjjhi78beuNflkdL76ACy81t2TvpxoPoUIG098kW3xd720oqQkyWJTgM+wV96bD +ycmRgNQpvqHYKWtZIyZCTzKzTTIdqg/sbE/D8cHGmoy0eHUDshcE0EtxsQARAQAB +tEhQdXBwZXQsIEluYy4gUmVsZWFzZSBLZXkgKFB1cHBldCwgSW5jLiBSZWxlYXNl +IEtleSkgPHJlbGVhc2VAcHVwcGV0LmNvbT6JAj4EEwECACgFAle2Iz4CGwMFCQlm +AYAGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEH9DgoDvjTSfIN0P/jcCRzK8 +WIdhcNz5dkj7xRZb8Oft2yDfenQmzb1SwGGa96IwJFcjF4Nq7ymcDUqunS2DEDb2 +gCucsqmW1ubkaggsYbc9voz/SQwhsQpBjfWbuyOX9DWmW6av/aB1F85wP79gyfqT +uidTGxQE6EhDbLe7tuvxOHfM1bKsUtI+0n9TALLLHfXUEdtaXCwMlJuO1IIn1PWa +H7HzyEjw6OW/cy73oM9nuErBIio1O60slPLOW2XNhdWZJCRWkcXyuumRjoepz7WN +1JgsLOTcB7rcQaBP3pDN0O/Om5dlDQ6oYitoJs/F0gfEgwK68Uy8k8sUR+FLLJqM +o0CwOg6CeWU4ShAEd1xZxVYW6VOOKlz9x9dvjIVDn2SlTBDmLS99ySlQS57rjGPf +GwlRUnuZP4OeSuoFNNJNb9PO6XFSP66eNHFbEpIoBU7phBzwWpTXNsW+kAcY8Rno +8GzKR/2FRsxe5Nhfh8xy88U7BA0tqxWdqpk/ym+wDcgHBfSRt0dPFnbaHAiMRlgX +J/NPHBQtkoEdQTKA+ICxcNTUMvsPDQgZcU1/ViLMN+6kZaGNDVcPeMgDvqxu0e/T +b3uYiId38HYbHmD6rDrOQL/2VPPXbdGbxDGQUgX1DfdOuFXw1hSTilwI1KdXxUXD +sCsZbchgliqGcI1l2En62+6pI2x5XQqqiJ7+ +=HpaX +-----END PGP PUBLIC KEY BLOCK----- diff --git a/yum.repos/epel-testing.repo b/yum.repos/epel-testing.repo new file mode 100644 index 0000000..87c07b8 --- /dev/null +++ b/yum.repos/epel-testing.repo @@ -0,0 +1,31 @@ +[epel-testing] +name=Extra Packages for Enterprise Linux 7 - Testing - $basearch +#baseurl=http://download.fedoraproject.org/pub/epel/testing/7/$basearch +metalink=https://mirrors.fedoraproject.org/metalink?repo=testing-epel7&arch=$basearch +failovermethod=priority +enabled=0 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 +baseurl=https://download.fedoraproject.org/pub/epel/testing/7/$basearch + +[epel-testing-debuginfo] +name=Extra Packages for Enterprise Linux 7 - Testing - $basearch - Debug +#baseurl=http://download.fedoraproject.org/pub/epel/testing/7/$basearch/debug +metalink=https://mirrors.fedoraproject.org/metalink?repo=testing-debug-epel7&arch=$basearch +failovermethod=priority +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 +gpgcheck=1 +baseurl=https://download.fedoraproject.org/pub/epel/testing/7/$basearch/debug + +[epel-testing-source] +name=Extra Packages for Enterprise Linux 7 - Testing - $basearch - Source +#baseurl=http://download.fedoraproject.org/pub/epel/testing/7/SRPMS +metalink=https://mirrors.fedoraproject.org/metalink?repo=testing-source-epel7&arch=$basearch +failovermethod=priority +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 +gpgcheck=1 +baseurl=https://download.fedoraproject.org/pub/epel/testing/7/SRPMS + +# vim: filetype=dosini diff --git a/yum.repos/epel.repo b/yum.repos/epel.repo new file mode 100644 index 0000000..0c76268 --- /dev/null +++ b/yum.repos/epel.repo @@ -0,0 +1,32 @@ +[epel] +name=Extra Packages for Enterprise Linux 7 - $basearch +#baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch +baseurl=https://repo.pixelpark.com/Linux/yum/epel/7/$basearch +#metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch +failovermethod=priority +enabled=1 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 + +[epel-debuginfo] +name=Extra Packages for Enterprise Linux 7 - $basearch - Debug +#baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch/debug +metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-debug-7&arch=$basearch +failovermethod=priority +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 +gpgcheck=1 +mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=epel-debug-7&arch=$basearch + +[epel-source] +name=Extra Packages for Enterprise Linux 7 - $basearch - Source +#baseurl=http://download.fedoraproject.org/pub/epel/7/SRPMS +metalink=https://mirrors.fedoraproject.org/metalink?repo=epel-source-7&arch=$basearch +failovermethod=priority +enabled=0 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 +gpgcheck=1 +mirrorlist=https://mirrors.fedoraproject.org/mirrorlist?repo=epel-source-7&arch=$basearch + + +# vim: filetype=dosini diff --git a/yum.repos/puppet.repo b/yum.repos/puppet.repo new file mode 100644 index 0000000..7ca355b --- /dev/null +++ b/yum.repos/puppet.repo @@ -0,0 +1,16 @@ +[puppet] +name=Puppet Repository el 7 - $basearch +baseurl=https://repo.pixelpark.com/Linux/yum/puppetlabs/puppet5/el/7/$basearch +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppet-release +enabled=1 +gpgcheck=1 + +[puppet-source] +name=Puppet Repository el 7 - Source +baseurl=http://yum.puppetlabs.com/puppet/el/7/SRPMS +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppet-release +failovermethod=priority +enabled=0 +gpgcheck=1 + +# vim: filetype=dosini diff --git a/yum.repos/rpm-repo.pixelpark.com.repo b/yum.repos/rpm-repo.pixelpark.com.repo new file mode 100644 index 0000000..844d30f --- /dev/null +++ b/yum.repos/rpm-repo.pixelpark.com.repo @@ -0,0 +1,9 @@ +[rpm-repo.pixelpark.com] +name=Pixelpark Repo +baseurl=http://rpm-repo.pixelpark.com/$basearch +enabled=1 +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-pixelpark +metadata_expire=10 + +# vim: filetype=dosini