From 2cd057a99f66789598bc2edc78f3e02765958761 Mon Sep 17 00:00:00 2001 From: Dan Kelleher Date: Thu, 20 Aug 2015 21:46:22 -0400 Subject: [PATCH] Remove Arch from postinstall and added PKGBUILD and one-context.install --- PKGBUILD | 20 ++++++++++++++++++++ one-context.install | 5 +++++ postinstall | 9 --------- 3 files changed, 25 insertions(+), 9 deletions(-) create mode 100644 PKGBUILD create mode 100644 one-context.install diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..76dbdb1 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,20 @@ +# Maintainer Harvard University FAS Research Computing + +pkgname=one-context +pkgver=4.14.1 +pkgrel=1 +pkgdesc='OpenNebula Contextualisation' +arch=('any') +url='https://github.com/OpenNebula/addon-context-linux/releases' +license=('Apache') +depends=() +source=("https://github.com/fasrc/addon-context-linux/archive/v4.14.1.3.tar.gz") +install=one-context.install + +package() { + cp -rT ${srcdir}/addon-context-linux-4.14.1.3/base_arch ${pkgdir} + cp -rT ${srcdir}/addon-context-linux-4.14.1.3/base ${pkgdir} + cp -rT ${pkgdir}/usr/sbin ${pkgdir}/usr/bin + rm -rf ${pkgdir}/usr/sbin +} +md5sums=('2c0633841563a0008e224014a7c01478') \ No newline at end of file diff --git a/one-context.install b/one-context.install new file mode 100644 index 0000000..aee1d79 --- /dev/null +++ b/one-context.install @@ -0,0 +1,5 @@ +post_install(){ + systemctl enable one-context + + rm -f /etc/systemd/network/* +} \ No newline at end of file diff --git a/postinstall b/postinstall index e7470eb..4e48c3e 100755 --- a/postinstall +++ b/postinstall @@ -42,12 +42,3 @@ if [ -d /etc/sysconfig/network-scripts ]; then # Prepare network files rm -f /etc/sysconfig/network-scripts/ifcfg-eth* fi - -# Arch based distros -if [ -d /etc/systemd/network]; then - # Register Service - sytemctl enable one-context - - # Prepare network files - rm -f /etc/systemd/network/* -fi