diff --git a/.SRCINFO b/.SRCINFO index 7bca865..26ae8d0 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,13 +1,17 @@ pkgbase = rc-local pkgdesc = Support for legacy rc.local scripts - pkgver = 1 + pkgver = 1.1 pkgrel = 1 - url = https://aur.archlinux.org/packages/rc-local/ + url = https://aur.archlinux.org/packages/rc-local + install = rc-local.install arch = any - license = BSD - depends = bash + license = LGPL2.1 + depends = systemd + backup = etc/rc.local + source = rc.local source = rc-local.service - md5sums = bb2cfecf3c6d99c6e6ee9eb58bcde75d + sha256sums = 8aa661c15cf9a35c32c79055bf69ab2d16354128ddd67a1bce0a7e48fe26f2e3 + sha256sums = 7ac3eae0aee580448acbe386a3a2954990510790c42f2b9a0df293078d22dc14 pkgname = rc-local diff --git a/PKGBUILD b/PKGBUILD index 46e01d2..a5f2725 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,19 +1,23 @@ -# Maintainer: megadriver +# Maintainer: Manuel Hüsers +# Contributor: megadriver # Contributor: $pooky Hunter pkgname=rc-local -pkgver=1 +pkgver=1.1 pkgrel=1 -pkgdesc="Support for legacy rc.local scripts" -url=("https://aur.archlinux.org/packages/rc-local/") +pkgdesc='Support for legacy rc.local scripts' +url=('https://aur.archlinux.org/packages/rc-local') arch=('any') -license=('BSD') -depends=('bash') -source=(rc-local.service) -md5sums=('bb2cfecf3c6d99c6e6ee9eb58bcde75d') +license=('LGPL2.1') +install="${pkgname}.install" +depends=('systemd') +backup=('etc/rc.local') +source=('rc.local' + 'rc-local.service') +sha256sums=('8aa661c15cf9a35c32c79055bf69ab2d16354128ddd67a1bce0a7e48fe26f2e3' + '7ac3eae0aee580448acbe386a3a2954990510790c42f2b9a0df293078d22dc14') package() { - echo "#!/bin/bash" > rc.local - install -D -m 0755 rc.local $pkgdir/etc/rc.local - install -D -m 0644 rc-local.service $pkgdir/usr/lib/systemd/system/rc-local.service + install -Dm755 'rc.local' "${pkgdir}/etc/rc.local" + install -Dm644 'rc-local.service' "${pkgdir}/usr/lib/systemd/system/rc-local.service" } diff --git a/rc-local.install b/rc-local.install new file mode 100644 index 0000000..9908ee1 --- /dev/null +++ b/rc-local.install @@ -0,0 +1,16 @@ +_update() { + systemctl daemon-reload +} + +post_install() { + _update + systemctl enable rc-local.service +} + +post_upgrade() { + _update +} + +post_remove() { + _update +} \ No newline at end of file diff --git a/rc-local.service b/rc-local.service index c56106f..c7d6fcf 100644 --- a/rc-local.service +++ b/rc-local.service @@ -1,11 +1,21 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + [Unit] -Description=/etc/rc.local compatibility -After=network.target +Description=/etc/rc.local Compatibility +ConditionFileIsExecutable=/etc/rc.local [Service] -Type=oneshot -ExecStart=/etc/rc.local +Type=forking +ExecStart=/etc/rc.local start +TimeoutSec=0 +StandardOutput=tty RemainAfterExit=yes - +SysVStartPriority=99 + [Install] WantedBy=multi-user.target diff --git a/rc.local b/rc.local new file mode 100644 index 0000000..65634df --- /dev/null +++ b/rc.local @@ -0,0 +1,14 @@ +#!/bin/sh -e +# +# rc.local +# +# This script is executed at the end of each multiuser runlevel. +# Make sure that the script will "exit 0" on success or any other +# value on error. +# +# In order to enable or disable this script just change the execution +# bits. +# +# By default this script does nothing. + +exit 0