Merge pull request #3864 from MilhouseVH/le10_fix_systemd243_warning

udev: fix systemd-243 warnings
This commit is contained in:
Christian Hewitt 2019-10-25 04:45:46 +04:00 committed by GitHub
commit f669160ef1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 41 additions and 22 deletions

View File

@ -20,6 +20,7 @@ post_makeinstall_target() {
# Install rpi btuart script to bring up Bluetooth
mkdir -p $INSTALL/usr/bin
cp -P $PKG_DIR/scripts/rpi-btuart $INSTALL/usr/bin
cp -P $PKG_DIR/scripts/rpi-udev $INSTALL/usr/bin
}
post_install() {

View File

@ -0,0 +1,12 @@
#!/bin/sh
ALIASES="/proc/device-tree/aliases"
UARTX="uart${1}"
if [ $(cat ${ALIASES}/${UARTX}) = $(cat ${ALIASES}/serial0) ]; then
echo 0
elif [ $(cat ${ALIASES}/${UARTX}) = $(cat ${ALIASES}/serial1) ]; then
echo 1
else
exit 1
fi

View File

@ -1,21 +1,2 @@
KERNEL=="ttyAMA[01]", PROGRAM="/bin/sh -c '\
ALIASES=/proc/device-tree/aliases; \
if [ $(cat $ALIASES/uart0) = $(cat $ALIASES/serial0) ]; then \
echo 0;\
elif [ $(cat $ALIASES/uart0) = $(cat $ALIASES/serial1) ]; then \
echo 1; \
else \
exit 1; \
fi\
'", SYMLINK+="serial%c"
KERNEL=="ttyS0", PROGRAM="/bin/sh -c '\
ALIASES=/proc/device-tree/aliases; \
if [ $(cat $ALIASES/uart1) = $(cat $ALIASES/serial0) ]; then \
echo 0; \
elif [ $(cat $ALIASES/uart1) = $(cat $ALIASES/serial1) ]; then \
echo 1; \
else \
exit 1; \
fi \
'", SYMLINK+="serial%c"
KERNEL=="ttyAMA[01]", PROGRAM="/usr/bin/rpi-udev 0", SYMLINK+="serial%c"
KERNEL=="ttyS0", PROGRAM="/usr/bin/rpi-udev 1", SYMLINK+="serial%c"

View File

@ -1,8 +1,9 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)
ACTION!="add|change", GOTO="end"
DRIVER=="ehci-pci|xhci_hcd", RUN+="/usr/bin/sh -c 'echo disabled > /sys/$devpath/power/wakeup'"
DRIVER=="ehci-pci|xhci_hcd", RUN+="/usr/bin/sh -c 'echo disabled > /sys$devpath/power/wakeup'"
LABEL="end"

View File

@ -48,6 +48,8 @@ post_makeinstall_target() {
rm -rf $INSTALL/usr/share
rm -rf $INSTALL/etc/vmware-tools/scripts/vmware/network
chmod -x $INSTALL/usr/lib/udev/rules.d/*.rules
find $INSTALL/etc/vmware-tools/ -type f | xargs sed -i '/.*expr.*/d'
}

View File

@ -0,0 +1,22 @@
From 81480daf43f5a42b268cc1c43d8c9e2164e5cd88 Mon Sep 17 00:00:00 2001
From: MilhouseVH <milhouseVH.github@nmacleod.com>
Date: Tue, 24 Sep 2019 13:20:51 +0100
Subject: [PATCH] stop systemd-243 udev complaints
---
udev/99-vmware-scsi-udev.rules | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/udev/99-vmware-scsi-udev.rules b/udev/99-vmware-scsi-udev.rules
index 053b59706..051040ef7 100644
--- a/udev/99-vmware-scsi-udev.rules
+++ b/udev/99-vmware-scsi-udev.rules
@@ -2,6 +2,6 @@
#
# This file is part of open-vm-tools
-ACTION=="add", SUBSYSTEMS=="scsi", ATTRS{vendor}=="VMware*", ATTRS{model}=="Virtual disk*", ENV{DEVTYPE}=="disk", RUN+="/bin/sh -c 'echo 180 >/sys$DEVPATH/device/timeout'"
-ACTION=="add", SUBSYSTEMS=="scsi", ATTRS{vendor}=="VMware*", ATTRS{model}=="VMware Virtual S", ENV{DEVTYPE}=="disk", RUN+="/bin/sh -c 'echo 180 >/sys$DEVPATH/device/timeout'"
+ACTION=="add", SUBSYSTEMS=="scsi", ATTRS{vendor}=="VMware*", ATTRS{model}=="Virtual disk*", ENV{DEVTYPE}=="disk", RUN+="/bin/sh -c 'echo 180 >/sys$env{DEVPATH}/device/timeout'"
+ACTION=="add", SUBSYSTEMS=="scsi", ATTRS{vendor}=="VMware*", ATTRS{model}=="VMware Virtual S", ENV{DEVTYPE}=="disk", RUN+="/bin/sh -c 'echo 180 >/sys$env{DEVPATH}/device/timeout'"