summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntonio Orefice2019-04-04 15:08:45 +0200
committerAntonio Orefice2019-04-04 15:08:45 +0200
commit5642b8656875a1fda2e4f3eeb612ffdfc95efad3 (patch)
treea7b7385583aec1cb7b73102887ff26eb652b7740
parent2e0c3e77f4f916563c7d070466e09eeaffebdc76 (diff)
downloadaur-5642b8656875a1fda2e4f3eeb612ffdfc95efad3.tar.gz
Add wired devices to the rule and an install file to reload udev rules
-rw-r--r--10-net-names-crc16.rules1
-rw-r--r--PKGBUILD8
-rw-r--r--net-names-crc16.install11
3 files changed, 17 insertions, 3 deletions
diff --git a/10-net-names-crc16.rules b/10-net-names-crc16.rules
index 3038d889757c..5016ffe2e388 100644
--- a/10-net-names-crc16.rules
+++ b/10-net-names-crc16.rules
@@ -1 +1,2 @@
SUBSYSTEM=="net", ACTION=="add", KERNEL=="wlan*", PROGRAM="/usr/bin/crc16.sh $attr{address}", NAME="wlan%c{1}"
+SUBSYSTEM=="net", ACTION=="add", KERNEL=="eth*", PROGRAM="/usr/bin/crc16.sh $attr{address}", NAME="eth%c{1}"
diff --git a/PKGBUILD b/PKGBUILD
index 2478cf80f29a..ed92b9813475 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -12,11 +12,13 @@ conflicts=("${pkgname}")
depends=('bash' 'udev')
source=(10-net-names-crc16.rules crc16.sh)
+sha256sums=('efc5582c92ab56dc743c63107cb39b0fb91333c2b1777fc8a002aa25a0aa4e14'
+ '1760f03a70d16f0de9187e930aa1143f0de1425bb8cb53f90973f0f12bbe94a8')
+
package() {
-# cd ${pkgname}-${pkgver}
install -Dm644 10-net-names-crc16.rules ${pkgdir}/etc/udev/rules.d/10-net-names-crc16.rules
install -Dm755 crc16.sh ${pkgdir}/usr/bin/crc16.sh
}
-sha256sums=('efc5582c92ab56dc743c63107cb39b0fb91333c2b1777fc8a002aa25a0aa4e14'
- '1760f03a70d16f0de9187e930aa1143f0de1425bb8cb53f90973f0f12bbe94a8')
+install=${pkgname}.install
+
diff --git a/net-names-crc16.install b/net-names-crc16.install
new file mode 100644
index 000000000000..64a39eb2d562
--- /dev/null
+++ b/net-names-crc16.install
@@ -0,0 +1,11 @@
+post_install() {
+ udevadm control --reload
+}
+
+post_upgrade() {
+ udevadm control --reload
+}
+
+post_remove() {
+ udevadm control --reload
+}