Add 'rc-local/' from commit 'f0441047ba45e4e81ab398f055db9f68480fd492'

git-subtree-dir: rc-local
git-subtree-mainline: c91488a4fe
git-subtree-split: f0441047ba
This commit is contained in:
Manuel 2022-10-18 00:00:01 +02:00
commit 0ac56c082a
5 changed files with 81 additions and 0 deletions

16
rc-local/.SRCINFO Normal file
View file

@ -0,0 +1,16 @@
pkgbase = rc-local
pkgdesc = Support for legacy rc.local scripts
pkgver = 4
pkgrel = 1
url = https://aur.archlinux.org/packages/rc-local/
install = rc-local.install
arch = any
license = LGPL2.1
depends = systemd
backup = etc/rc.local
source = rc.local
source = rc-local.service
sha256sums = 8aa661c15cf9a35c32c79055bf69ab2d16354128ddd67a1bce0a7e48fe26f2e3
sha256sums = f8c4f7a72833bb568bd4848ad16442cb3150b438184e0a6d30348fb518f969ae
pkgname = rc-local

23
rc-local/PKGBUILD Normal file
View file

@ -0,0 +1,23 @@
# Maintainer: Manuel Hüsers <aur@huesers.de>
# Contributor: megadriver <megadriver at gmx dot com>
# Contributor: $pooky Hunter <spookyh+arch@gmail.org>
pkgname=rc-local
pkgver=4
pkgrel=1
pkgdesc='Support for legacy rc.local scripts'
url="https://aur.archlinux.org/packages/${pkgname}/"
arch=('any')
license=('LGPL2.1')
install="${pkgname}.install"
depends=('systemd')
backup=('etc/rc.local')
source=('rc.local'
'rc-local.service')
sha256sums=('8aa661c15cf9a35c32c79055bf69ab2d16354128ddd67a1bce0a7e48fe26f2e3'
'f8c4f7a72833bb568bd4848ad16442cb3150b438184e0a6d30348fb518f969ae')
package() {
install -Dm755 'rc.local' "${pkgdir}/etc/rc.local"
install -Dm644 'rc-local.service' "${pkgdir}/usr/lib/systemd/system/rc-local.service"
}

View file

@ -0,0 +1,8 @@
post_install() {
cat <<EOF
==> Please activate the rc-local service to execute /etc/rc.local on boot.
==> Run as root: systemctl enable rc-local.service
EOF
}

20
rc-local/rc-local.service Normal file
View file

@ -0,0 +1,20 @@
# 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
ConditionFileIsExecutable=/etc/rc.local
[Service]
Type=forking
ExecStart=/etc/rc.local start
TimeoutSec=0
StandardOutput=tty
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target

14
rc-local/rc.local Normal file
View file

@ -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