mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-26 08:01:14 +02:00
sys-fs/udev-init-scripts: Add from Gentoo
It's from Gentoo commit 1367a1498225bc2636c875c8b3c3e7a66d82c000.
This commit is contained in:
parent
e107522864
commit
756b4225c2
1
sdk_container/src/third_party/coreos-overlay/sys-fs/udev-init-scripts/Manifest
vendored
Normal file
1
sdk_container/src/third_party/coreos-overlay/sys-fs/udev-init-scripts/Manifest
vendored
Normal file
@ -0,0 +1 @@
|
||||
DIST udev-init-scripts-35.tar.gz 3666 BLAKE2B fddae466428605ea930519e8a47e0ea91f89f9eacc1fd97c137d175142125b12c3d045aec68db35a463de444ac6d8c037cca55f9628f10576c968259d566a9e4 SHA512 da9d2093149967e2e1b9bc7190ddfd55a87c9ae2177e3216f7cb2694fc9b64037eb6f2599ad8a4b7594ef32ced88fbb319c92904bc72a81ea5404945f8a8378a
|
7
sdk_container/src/third_party/coreos-overlay/sys-fs/udev-init-scripts/metadata.xml
vendored
Normal file
7
sdk_container/src/third_party/coreos-overlay/sys-fs/udev-init-scripts/metadata.xml
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="project">
|
||||
<email>systemd@gentoo.org</email>
|
||||
</maintainer>
|
||||
</pkgmetadata>
|
@ -0,0 +1,50 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
OLD_PN=udev-gentoo-scripts
|
||||
OLD_P=${OLD_PN}-${PV}
|
||||
|
||||
if [ "${PV}" = "9999" ]; then
|
||||
EGIT_REPO_URI="https://anongit.gentoo.org/proj/${OLD_PN}.git"
|
||||
inherit git-r3
|
||||
else
|
||||
SRC_URI="https://gitweb.gentoo.org/proj/${OLD_PN}.git/snapshot/${OLD_P}.tar.gz -> ${P}.tar.gz"
|
||||
S="${WORKDIR}/${OLD_P}"
|
||||
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
|
||||
fi
|
||||
|
||||
DESCRIPTION="udev startup scripts for openrc"
|
||||
HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
RDEPEND=">=virtual/udev-217
|
||||
!<sys-apps/openrc-0.14"
|
||||
|
||||
src_install() {
|
||||
local -x SYSCONFDIR="${EPREFIX}/etc"
|
||||
default
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# Add udev and udev-trigger to the sysinit runlevel automatically.
|
||||
for f in udev udev-trigger; do
|
||||
if [[ -x "${EROOT}/etc/init.d/${f}" &&
|
||||
-d "${EROOT}/etc/runlevels/sysinit" &&
|
||||
! -L "${EROOT}/etc/runlevels/sysinit/${f}" ]]; then
|
||||
ln -snf "${EPREFIX}/etc/init.d/${f}" "${EROOT}/etc/runlevels/sysinit/${f}"
|
||||
ewarn "Adding ${f} to the sysinit runlevel"
|
||||
fi
|
||||
done
|
||||
|
||||
if ! has_version "sys-fs/eudev[rule-generator]" && \
|
||||
[[ -x $(type -P rc-update) ]] && rc-update show | grep udev-postmount | grep -qs 'boot\|default\|sysinit'; then
|
||||
ewarn "The udev-postmount service has been removed because the reasons for"
|
||||
ewarn "its existance have been removed upstream."
|
||||
ewarn "Please remove it from your runlevels."
|
||||
fi
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
# Copyright 1999-2021 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI=8
|
||||
OLD_PN=udev-gentoo-scripts
|
||||
OLD_P=${OLD_PN}-${PV}
|
||||
|
||||
if [ "${PV}" = "9999" ]; then
|
||||
EGIT_REPO_URI="https://anongit.gentoo.org/proj/${OLD_PN}.git"
|
||||
inherit git-r3
|
||||
else
|
||||
SRC_URI="https://gitweb.gentoo.org/proj/${OLD_PN}.git/snapshot/${OLD_P}.tar.gz -> ${P}.tar.gz"
|
||||
S="${WORKDIR}/${OLD_P}"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
|
||||
fi
|
||||
|
||||
DESCRIPTION="udev startup scripts for openrc"
|
||||
HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
|
||||
RESTRICT="test"
|
||||
|
||||
RDEPEND=">=virtual/udev-217
|
||||
!<sys-apps/openrc-0.14"
|
||||
|
||||
src_install() {
|
||||
local -x SYSCONFDIR="${EPREFIX}/etc"
|
||||
default
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
# Add udev and udev-trigger to the sysinit runlevel automatically.
|
||||
for f in udev udev-trigger; do
|
||||
if [[ -x "${EROOT}/etc/init.d/${f}" &&
|
||||
-d "${EROOT}/etc/runlevels/sysinit" &&
|
||||
! -L "${EROOT}/etc/runlevels/sysinit/${f}" ]]; then
|
||||
ln -snf "${EPREFIX}/etc/init.d/${f}" "${EROOT}/etc/runlevels/sysinit/${f}"
|
||||
ewarn "Adding ${f} to the sysinit runlevel"
|
||||
fi
|
||||
done
|
||||
|
||||
if ! has_version "sys-fs/eudev[rule-generator]" && \
|
||||
[[ -x $(type -P rc-update) ]] && rc-update show | grep udev-postmount | grep -qs 'boot\|default\|sysinit'; then
|
||||
ewarn "The udev-postmount service has been removed because the reasons for"
|
||||
ewarn "its existance have been removed upstream."
|
||||
ewarn "Please remove it from your runlevels."
|
||||
fi
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user