diff options
author | David P <megver83@parabola.nu> | 2021-07-02 17:59:23 -0400 |
---|---|---|
committer | David P <megver83@parabola.nu> | 2021-07-02 17:59:23 -0400 |
commit | 1df0f6aa746f3ce433684f82b6972cdb1c2b600e (patch) | |
tree | 76bfa75ed8d06ccaa8ec1a02d47bd82a5bf469e8 /nonsystemd | |
parent | 35f42abda206ca81bb32a886f1fc4b8463d828c1 (diff) | |
download | abslibre-1df0f6aa746f3ce433684f82b6972cdb1c2b600e.tar.gz abslibre-1df0f6aa746f3ce433684f82b6972cdb1c2b600e.tar.bz2 abslibre-1df0f6aa746f3ce433684f82b6972cdb1c2b600e.zip |
addpkg: nonsystemd/xudev 248.3-1
Signed-off-by: David P <megver83@parabola.nu>
Diffstat (limited to 'nonsystemd')
-rw-r--r-- | nonsystemd/xudev/0001-Use-Arch-Linux-device-access-groups.patch | 72 | ||||
-rw-r--r-- | nonsystemd/xudev/20-sysusers.hook | 10 | ||||
-rw-r--r-- | nonsystemd/xudev/30-tmpfiles.hook | 10 | ||||
-rw-r--r-- | nonsystemd/xudev/30-udev-hwdb.hook | 11 | ||||
-rw-r--r-- | nonsystemd/xudev/30-udev-reload.hook | 11 | ||||
-rw-r--r-- | nonsystemd/xudev/PKGBUILD | 306 | ||||
-rw-r--r-- | nonsystemd/xudev/initcpio-hook-udev | 22 | ||||
-rw-r--r-- | nonsystemd/xudev/initcpio-install-udev | 29 | ||||
-rw-r--r-- | nonsystemd/xudev/udev-hook | 21 |
9 files changed, 492 insertions, 0 deletions
diff --git a/nonsystemd/xudev/0001-Use-Arch-Linux-device-access-groups.patch b/nonsystemd/xudev/0001-Use-Arch-Linux-device-access-groups.patch new file mode 100644 index 000000000..38a4ba7ad --- /dev/null +++ b/nonsystemd/xudev/0001-Use-Arch-Linux-device-access-groups.patch @@ -0,0 +1,72 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com> +Date: Tue, 6 Mar 2018 23:39:47 +0100 +Subject: [PATCH] Use Arch Linux' device access groups +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + + cdrom → optical + dialout → uucp + tape → storage +--- + rules.d/50-udev-default.rules.in | 14 +++++++------- + sysusers.d/basic.conf.in | 6 +++--- + 2 files changed, 10 insertions(+), 10 deletions(-) + +diff --git a/rules.d/50-udev-default.rules.in b/rules.d/50-udev-default.rules.in +index edfa8bb107..35b8d4ba41 100644 +--- a/rules.d/50-udev-default.rules.in ++++ b/rules.d/50-udev-default.rules.in +@@ -22,7 +22,7 @@ SUBSYSTEM=="tty", KERNEL=="sclp_line[0-9]*", GROUP="tty", MODE="0620" + SUBSYSTEM=="tty", KERNEL=="ttysclp[0-9]*", GROUP="tty", MODE="0620" + SUBSYSTEM=="tty", KERNEL=="3270/tty[0-9]*", GROUP="tty", MODE="0620" + SUBSYSTEM=="vc", KERNEL=="vcs*|vcsa*", GROUP="tty" +-KERNEL=="tty[A-Z]*[0-9]|ttymxc[0-9]*|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*", GROUP="dialout" ++KERNEL=="tty[A-Z]*[0-9]|ttymxc[0-9]*|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*", GROUP="uucp" + + SUBSYSTEM=="mem", KERNEL=="mem|kmem|port", GROUP="kmem", MODE="0640" + +@@ -62,13 +62,13 @@ KERNEL=="irlpt[0-9]*", GROUP="lp" + SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ENV{ID_USB_INTERFACES}=="*:0701??:*", GROUP="lp" + + SUBSYSTEM=="block", GROUP="disk" +-SUBSYSTEM=="block", KERNEL=="sr[0-9]*", GROUP="cdrom" +-SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", GROUP="cdrom" +-KERNEL=="sch[0-9]*", GROUP="cdrom" +-KERNEL=="pktcdvd[0-9]*", GROUP="cdrom" +-KERNEL=="pktcdvd", GROUP="cdrom" ++SUBSYSTEM=="block", KERNEL=="sr[0-9]*", GROUP="optical" ++SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="4|5", GROUP="optical" ++KERNEL=="sch[0-9]*", GROUP="optical" ++KERNEL=="pktcdvd[0-9]*", GROUP="optical" ++KERNEL=="pktcdvd", GROUP="optical" + +-SUBSYSTEM=="scsi_generic|scsi_tape", SUBSYSTEMS=="scsi", ATTRS{type}=="1|8", GROUP="tape" ++SUBSYSTEM=="scsi_generic|scsi_tape", SUBSYSTEMS=="scsi", ATTRS{type}=="1|8", GROUP="storage" + SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="0", GROUP="disk" + KERNEL=="qft[0-9]*|nqft[0-9]*|zqft[0-9]*|nzqft[0-9]*|rawqft[0-9]*|nrawqft[0-9]*", GROUP="disk" + KERNEL=="loop-control", GROUP="disk", OPTIONS+="static_node=loop-control" +diff --git a/sysusers.d/basic.conf.in b/sysusers.d/basic.conf.in +index 4be0bd869e..cc3721b58a 100644 +--- a/sysusers.d/basic.conf.in ++++ b/sysusers.d/basic.conf.in +@@ -24,15 +24,15 @@ g utmp - - - + + # Hardware access groups + g audio - - - +-g cdrom - - - +-g dialout - - - + g disk - - - + g input - - - + g kvm - - - + g lp - - - ++g optical - - - + g render - - - + g sgx - - - +-g tape - - - ++g storage - - - ++g uucp - - - + g video - - - + + # Default group for normal users diff --git a/nonsystemd/xudev/20-sysusers.hook b/nonsystemd/xudev/20-sysusers.hook new file mode 100644 index 000000000..a773f1a47 --- /dev/null +++ b/nonsystemd/xudev/20-sysusers.hook @@ -0,0 +1,10 @@ +[Trigger] +Type = Path +Operation = Install +Operation = Upgrade +Target = usr/lib/sysusers.d/*.conf + +[Action] +Description = Creating system user accounts... +When = PostTransaction +Exec = /usr/bin/sysusers diff --git a/nonsystemd/xudev/30-tmpfiles.hook b/nonsystemd/xudev/30-tmpfiles.hook new file mode 100644 index 000000000..642954cc1 --- /dev/null +++ b/nonsystemd/xudev/30-tmpfiles.hook @@ -0,0 +1,10 @@ +[Trigger] +Type = Path +Operation = Install +Operation = Upgrade +Target = usr/lib/tmpfiles.d/*.conf + +[Action] +Description = Creating temporary files... +When = PostTransaction +Exec = /usr/bin/tmpfiles --create diff --git a/nonsystemd/xudev/30-udev-hwdb.hook b/nonsystemd/xudev/30-udev-hwdb.hook new file mode 100644 index 000000000..1b855cf0c --- /dev/null +++ b/nonsystemd/xudev/30-udev-hwdb.hook @@ -0,0 +1,11 @@ +[Trigger] +Type = Path +Operation = Install +Operation = Upgrade +Operation = Remove +Target = usr/lib/udev/hwdb.d/* + +[Action] +Description = Updating udev hardware database... +When = PostTransaction +Exec = /usr/share/libalpm/scripts/udev-hook hwdb diff --git a/nonsystemd/xudev/30-udev-reload.hook b/nonsystemd/xudev/30-udev-reload.hook new file mode 100644 index 000000000..96e81df0a --- /dev/null +++ b/nonsystemd/xudev/30-udev-reload.hook @@ -0,0 +1,11 @@ +[Trigger] +Type = Path +Operation = Install +Operation = Upgrade +Operation = Remove +Target = usr/lib/udev/rules.d/* + +[Action] +Description = Reloading device manager configuration... +When = PostTransaction +Exec = /usr/share/libalpm/scripts/udev-hook udev-reload diff --git a/nonsystemd/xudev/PKGBUILD b/nonsystemd/xudev/PKGBUILD new file mode 100644 index 000000000..697321044 --- /dev/null +++ b/nonsystemd/xudev/PKGBUILD @@ -0,0 +1,306 @@ +# Maintainer: David P. <megver83@parabola.nu> +# Maintainer (Artix): Christian Hesse <mail@eworm.de> +# Maintainer (Artix): Dave Reisner <dreisner@archlinux.org> +# Maintainer (Artix): Tom Gundersen <teg@jklm.no> + +# Remove the 'replaces' variables in package functions in the near future + +_pkgbase=systemd + +pkgbase=xudev +pkgname=('xudev' 'libxudev' 'etmpfiles' 'esysusers' + 'xudev-docs' 'etmpfiles-docs' 'esysusers-docs') +pkgdesc='Userspace device file manager' +_tag='fd9ad7d3bc35a3633b99edac14ff2a4fb10599b7' # git rev-parse v${pkgver} +_tag_name=248.3 +pkgver="${_tag_name/-/}" +pkgrel=1 +arch=('x86_64') +arch+=('i686' 'armv7h') +url='https://www.github.com/systemd/systemd' +license=('GPL2' 'LGPL2.1') +makedepends=('acl' 'libacl.so' 'docbook-xsl' 'gperf' 'kbd' 'hwids' 'intltool' 'kmod' 'libkmod.so' + 'libcap' 'libcap.so' 'util-linux' 'libblkid.so' 'git' 'meson' 'rsync') +options=('strip') +validpgpkeys=('63CDA1E5D3FC22B998D20DD6327F26951A015CC4' # Lennart Poettering <lennart@poettering.net> + '5C251B5FC54EB2F80F407AAAC54CA336CFEB557E') # Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> +source=("git+https://github.com/systemd/systemd-stable#tag=${_tag}?signed" + "git+https://github.com/systemd/systemd#tag=v${_tag_name%.*}?signed" + '0001-Use-Arch-Linux-device-access-groups.patch' + 'initcpio-hook-udev' + 'initcpio-install-udev' + 'udev-hook' + '20-sysusers.hook' + '30-udev-hwdb.hook' + '30-tmpfiles.hook' + '30-udev-reload.hook') +sha512sums=('SKIP' + 'SKIP' + '0db4a6ee10140bcda5021d6be573180410166b9c30f93037641df7fa733af146ed42bf67bdd4a00bf81bd741d4d4f707decfdb487d95603f98d492e2b51ee21d' + '32606b42856b5f3ea7f485143e532671f58986237e14c58ea5ab17383dc39a375cb6c738c8a2db9e4a8c8be88ea44a876d6bbed129cb2f5c9aa3f8228b04d927' + 'a57b8b34d9ece76342726864dad6d923b461f867c122a069bd521c99c4b951a00a532a8cd30426e678e2c160d00b40a7f6fbb4f1a7a15e47ac6bb5df42fbc4f2' + '8291ae9f1f4ac0cdf007aa84c6240a2b849ad672d47cc0e3f89c1f83819fe7127d9dd6def139099cd470906a5e7e41a0ff6c5d64d106e478a0916023b177d443' + '9a02d97585b9ad5b8016b605ddb35027df3c3a107c8619e568dc3a3cd787eedfb059f8ab5acd578a270e299b63516383ee8d620083bcb1c2fc32cf54f8d5c77d' + 'cee9240dac5888d1dde916429ac25c022e30b5d7c53ba9e699e281021d2224bfd6e4cc4ac1c71c15f768b720d524cac0dabaae06d026a68759f6fe84b4c62751' + '54dd41c1d765923f41e9175bdb4f424b4574215b6c514da474c3d4bdf8cf0c1e7c727e6613456db8bc4698aa9ce1a7a29ad127ad25eb8507b8df2d87546fc5f7' + '5aa475f37d35752a95e73417c38c4d3bc4d15d5f1052e95d75b4c4144b74c79af94da1d1e954be536339f9829a1ceb3a1bc5c6adceb187df7a8e5f5a83e4a850') + +_backports=( +) + +_reverts=( +) + +prepare() { + cd "$_pkgbase-stable" + + # add upstream repository for cherry-picking + git remote add -f upstream ../systemd + + local _c + for _c in "${_backports[@]}"; do + git log --oneline -1 "${_c}" + git cherry-pick -n "${_c}" + done + for _c in "${_reverts[@]}"; do + git log --oneline -1 "${_c}" + git revert -n "${_c}" + done + + # Replace cdrom/dialout/tape groups with optical/uucp/storage + patch -Np1 -i ../0001-Use-Arch-Linux-device-access-groups.patch +} + +build() { + if ! [[ "$CARCH" == x86_64 ]]; then + CFLAGS+=" -Wno-error=implicit-function-declaration" + fi + + local _meson_options=( + -Dversion-tag="${pkgver}-${pkgrel}-artix" + -Drootprefix=/usr + -Dgcrypt=false + -Dlibcryptsetup=false + -Dlibidn=false + -Dlibidn2=false + -Dlibiptc=false + -Dseccomp=false + -Dlz4=false + -Dxz=false + -Dstandalone-binaries=true + -Dsysusers=true + -Dtmpfiles=true + -Dhwdb=true + -Dlink-udev-shared=false + -Dgshadow=true + + -Dtests=false + -Ddefault-mdns=no + -Dnss-myhostname=false + -Dhostnamed=false + -Dlocaled=false + -Dtimedated=false + -Dadm-group=true + -Dwheel-group=true + -Dman=true + -Defi=false + -Dlibfdisk=false + -Dp11kit=false + -Dima=false + -Dhomed=false + -Dutmp=false + -Dresolve=false + + -Dtpm=false + -Denvironment-d=false + -Dbinfmt=false + -Drepart=false + -Dcoredump=false + -Dpstore=false + -Dlogind=false + -Dmachined=false + -Dportabled=false + -Duserdb=false + -Dnetworkd=false + -Dtimesyncd=false + -Dremote=false + -Dnss-mymachines=false + -Dnss-resolve=false + -Dnss-systemd=false + -Dfirstboot=false + -Drandomseed=false + -Dbacklight=false + -Dvconsole=false + -Dquotacheck=false + -Dimportd=false + -Dxdg-autostart=false + -Drfkill=false + -Dfdisk=false + -Daudit=false + -Dpwquality=false + -Dmicrohttpd=false + -Dlibcurl=false + -Didn=false + -Dqrencode=false + -Dgnutls=false + -Dopenssl=false + -Dlibfido2=false + -Delfutils=false + -Dxkbcommon=false + -Dzstd=false + -Dlz4=false + -Dxz=false + -Dbzip2=false + -Dzlib=false + -Dpcre2=false + -Dglib=false + -Ddbus=false + -Dgnu-efi=false + -Dkernel-install=false + -Dfuzz-tests=false + -Danalyze=false + -Dselinux=false + -Dapparmor=false + -Dsmack=false + -Dinitrd=false + -Dpolkit=false + -Dldconfig=false + -Dhibernate=false + -Ddefault-llmnr=no + -Drpmmacrosdir=no + -Ddefault-dnssec=no + -Doomd=false + -Dsysext=false + -Dtpm2=false + -Dnscd=false + -Dtranslations=false + -Dfexecve=false + -Dvalgrind=false + -Dlog-trace=false + ) + + arch-meson "$_pkgbase-stable" build "${_meson_options[@]}" + + ninja -C build +} + +check() { + meson test -C build +} + +_package() { + install -d "${srcdir}"/_pkg + DESTDIR=""${srcdir}"/_pkg" meson install -C build +} + +package_xudev() { + pkgdesc='Userspace device file manager' + depends=('acl' 'libacl.so' 'kbd' 'kmod' 'libkmod.so' 'hwids' 'libxudev' + 'util-linux' 'libblkid.so') + provides=("udev=$pkgver" 'eudev') + conflicts=('udev') + + _package + + install -dm0755 "${pkgdir}"/{etc,usr/{lib/pkgconfig,include,bin,share/pkgconfig}} + mv -v "${srcdir}"/_pkg/etc/udev "${pkgdir}"/etc/udev + + mv -v "${srcdir}"/_pkg/usr/include/libudev.h "${pkgdir}"/usr/include/libudev.h + + mv -v "${srcdir}"/_pkg/usr/lib/pkgconfig/libudev.pc "${pkgdir}"/usr/lib/pkgconfig + + mv -v "${srcdir}"/_pkg/usr/lib/udev "${pkgdir}"/usr/lib/udev + mv -v "${srcdir}"/_pkg/usr/bin/udevadm "${pkgdir}"/usr/bin/udevadm + ln -sfv udevadm "${pkgdir}"/usr/bin/udevd + #mv -v "${srcdir}"/_pkg/usr/bin/systemd-hwdb "${pkgdir}"/usr/bin/udev-hwdb + + mv -v "${srcdir}"/_pkg/usr/share/pkgconfig/udev.pc "${pkgdir}"/usr/share/pkgconfig + + rm -v "${pkgdir}"/usr/lib/udev/rules.d/99-systemd.rules + + # initcpio + install -D -m0644 initcpio-install-udev "${pkgdir}"/usr/lib/initcpio/install/udev + install -D -m0644 initcpio-hook-udev "${pkgdir}"/usr/lib/initcpio/hooks/udev + + # pacman hooks + install -D -m0755 udev-hook "${pkgdir}"/usr/share/libalpm/scripts/udev-hook + install -D -m0644 -t "${pkgdir}"/usr/share/libalpm/hooks 30-udev-{reload,hwdb}.hook +} + +package_libxudev() { + pkgdesc='udev library for enumerating and introspecting local devices' + depends=('glibc') + provides=('libudev.so' 'libudev' 'libeudev') + conflicts=('libudev') + + install -dm0755 "${pkgdir}"/usr/lib + mv -v "${srcdir}"/_pkg/usr/lib/libudev*.* "${pkgdir}"/usr/lib +} + +package_etmpfiles() { + pkgdesc='the tmpfiles.d binary' + groups=('base-devel') + depends=('libcap' 'libcap.so' 'acl' 'libacl.so') + conflicts=('opentmpfiles') + replaces=('opentmpfiles') + + install -dm0755 "${pkgdir}"/{etc,usr/{bin,lib}} + mv -v "${srcdir}"/_pkg/etc/tmpfiles.d "${pkgdir}"/etc/tmpfiles.d + mv -v "${srcdir}"/_pkg/usr/lib/tmpfiles.d "${pkgdir}"/usr/lib/tmpfiles.d + mv -v "${srcdir}"/_pkg/usr/bin/systemd-tmpfiles.standalone "${pkgdir}"/usr/bin/tmpfiles + + rm -v "${pkgdir}"/usr/lib/tmpfiles.d/{*systemd*,journal*,legacy}.conf + + # pacman hooks + install -D -m0644 -t "${pkgdir}"/usr/share/libalpm/hooks *tmpfiles.hook +} + +package_esysusers() { + pkgdesc='the sysusers.d binary' + groups=('base-devel') + depends=('glibc') + conflicts=('opensysusers') + replaces=('opensysusers') + + install -dm0755 "${pkgdir}"/usr/{lib,bin} + mv -v "${srcdir}"/_pkg/usr/lib/sysusers.d "${pkgdir}"/usr/lib/sysusers.d + mv -v "${srcdir}"/_pkg/usr/bin/systemd-sysusers.standalone "${pkgdir}"/usr/bin/sysusers + + rm -v "${pkgdir}"/usr/lib/sysusers.d/systemd*.conf + + # pacman hooks + install -D -m0644 -t "${pkgdir}"/usr/share/libalpm/hooks *sysusers.hook +} + +package_xudev-docs() { + pkgdesc='Userspace device file manager (docs)' + + install -dm0755 "${pkgdir}"/usr/share/{doc/xudev,man/man{3,5,7,8}} + + mv -v "${srcdir}"/_pkg/usr/share/man/man5/udev*.5 "${pkgdir}"/usr/share/man/man5/ + mv -v "${srcdir}"/_pkg/usr/share/man/man7/{udev*,hwdb}.7 "${pkgdir}"/usr/share/man/man7/ + mv -v "${srcdir}"/_pkg/usr/share/man/man8/udev*.8 "${pkgdir}"/usr/share/man/man8/ + mv -v "${srcdir}"/_pkg/usr/share/man/man3/libudev* "${pkgdir}"/usr/share/man/man3/ + + cp -v "${srcdir}"/_pkg/usr/share/doc/systemd/{LICENSE.*,NEWS} "${pkgdir}"/usr/share/doc/xudev +} + +package_etmpfiles-docs(){ + pkgdesc='the tmpfiles.d binary (docs)' + conflicts=('opentmpfiles-docs') + replaces=('opentmpfiles-docs') + + install -dm0755 "${pkgdir}"/usr/share/{doc/etmpfiles,man/man5} + mv -v "${srcdir}"/_pkg/usr/share/man/man5/tmpfiles.d.5 "${pkgdir}"/usr/share/man/man5/ + cp -v "${srcdir}"/_pkg/usr/share/doc/systemd/{LICENSE.*,NEWS} "${pkgdir}"/usr/share/doc/etmpfiles +} + +package_esysusers-docs(){ + pkgdesc='the sysusers.d binary (docs)' + conflicts=('opensysusers-docs') + replaces=('opensysusers-docs') + + install -dm0755 "${pkgdir}"/usr/share/{doc/esysusers,man/man5} + mv -v "${srcdir}"/_pkg/usr/share/man/man5/sysusers.d.5 "${pkgdir}"/usr/share/man/man5/ + cp -v "${srcdir}"/_pkg/usr/share/doc/systemd/{LICENSE.*,NEWS} "${pkgdir}"/usr/share/doc/esysusers +} diff --git a/nonsystemd/xudev/initcpio-hook-udev b/nonsystemd/xudev/initcpio-hook-udev new file mode 100644 index 000000000..6ae0ba780 --- /dev/null +++ b/nonsystemd/xudev/initcpio-hook-udev @@ -0,0 +1,22 @@ +#!/usr/bin/ash + +run_earlyhook() { + kmod static-nodes --format=tmpfiles --output=/run/tmpfiles.d/kmod.conf + tmpfiles --prefix=/dev --create --boot + udevd --daemon --resolve-names=never + udevd_running=1 +} + +run_hook() { + msg ":: Triggering uevents..." + udevadm trigger --action=add --type=subsystems + udevadm trigger --action=add --type=devices + udevadm settle +} + +run_cleanuphook() { + udevadm control --exit + udevadm info --cleanup-db +} + +# vim: set ft=sh ts=4 sw=4 et: diff --git a/nonsystemd/xudev/initcpio-install-udev b/nonsystemd/xudev/initcpio-install-udev new file mode 100644 index 000000000..6b8ac3c63 --- /dev/null +++ b/nonsystemd/xudev/initcpio-install-udev @@ -0,0 +1,29 @@ +#!/bin/bash + +build() { + local rules tool + + add_binary /usr/bin/udevadm + add_symlink /usr/bin/udevd udevadm + add_binary /usr/bin/tmpfiles + + for rules in 50-udev-default.rules 60-persistent-storage.rules 64-btrfs.rules 80-drivers.rules; do + add_file "/usr/lib/udev/rules.d/$rules" + done + for tool in ata_id scsi_id; do + add_file "/usr/lib/udev/$tool" + done + + add_runscript +} + +help() { + cat <<HELPEOF +This hook adds the udev daemon to the initramfs, allowing for dynamic loading +of modules and reliable detection of the root device via tags (e.g. UUID or +LABEL). Do not remove this hook unless you are using the systemd hook, or you +know what you're doing. +HELPEOF +} + +# vim: set ft=sh ts=4 sw=4 et: diff --git a/nonsystemd/xudev/udev-hook b/nonsystemd/xudev/udev-hook new file mode 100644 index 000000000..327039741 --- /dev/null +++ b/nonsystemd/xudev/udev-hook @@ -0,0 +1,21 @@ +#!/bin/sh -e + +udevd_live() { + if [ ! -d /run/udev ]; then + echo >&2 " Skipped: Device manager is not running." + exit 0 + fi +} + +op="$1"; shift + +case "$op" in + #hwdb) /usr/bin/udev-hwdb --usr update ;; + hwdb) /usr/bin/udevadm hwdb --update ;; + + udev-reload) udevd_live; /usr/bin/udevadm control --reload ;; + + *) echo >&2 " Invalid operation '$op'"; exit 1 ;; +esac + +exit 0 |