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