Merge pull request #1800 from MilhouseVH/udev_cleanup

udev: cleanup
This commit is contained in:
Christian Hewitt 2017-07-22 21:49:57 +04:00 committed by GitHub
commit 38013dbc00
4 changed files with 10 additions and 2 deletions

View File

@ -21,7 +21,7 @@ ACTION!="add|change", GOTO="end"
SUBSYSTEM!="net", GOTO="end" SUBSYSTEM!="net", GOTO="end"
ENV{INTERFACE}!="eth*", GOTO="end" ENV{INTERFACE}!="eth*", GOTO="end"
RUN+="/bin/sh -c 'echo enabled >/sys/class/net/$env{INTERFACE}/device/power/wakeup' " TEST=="/sys/class/net/$env{INTERFACE}/device/power/wakeup", RUN+="/bin/sh -c 'echo enabled >/sys/class/net/$env{INTERFACE}/device/power/wakeup'"
RUN+="/usr/sbin/ethtool -s $env{INTERFACE} wol g" RUN+="/usr/sbin/ethtool -s $env{INTERFACE} wol g"
LABEL="end" LABEL="end"

View File

@ -144,6 +144,11 @@ post_makeinstall_target() {
# remove Network adaper renaming rule, this is confusing # remove Network adaper renaming rule, this is confusing
rm -rf $INSTALL/usr/lib/udev/rules.d/80-net-setup-link.rules rm -rf $INSTALL/usr/lib/udev/rules.d/80-net-setup-link.rules
# remove the uaccess rules as we don't build systemd with ACL (see https://github.com/systemd/systemd/issues/4107)
rm -rf $INSTALL/usr/lib/udev/rules.d/70-uaccess.rules
rm -rf $INSTALL/usr/lib/udev/rules.d/71-seat.rules
rm -rf $INSTALL/usr/lib/udev/rules.d/73-seat-late.rules
# remove debug-shell.service, we install our own # remove debug-shell.service, we install our own
rm -rf $INSTALL/usr/lib/systemd/system/debug-shell.service rm -rf $INSTALL/usr/lib/systemd/system/debug-shell.service

View File

@ -16,7 +16,7 @@ GOTO="exit"
# mount or umount for hdds # mount or umount for hdds
LABEL="harddisk" LABEL="harddisk"
ACTION=="add", RUN+="/usr/bin/systemctl restart udevil-mount@/dev/%k.service" ACTION=="add", PROGRAM="/usr/bin/sh -c '/usr/bin/grep -E ^/dev/%k\ /proc/mounts || true'", RESULT=="", RUN+="/usr/bin/systemctl restart udevil-mount@/dev/%k.service"
ACTION=="remove", RUN+="/usr/bin/systemctl stop udevil-mount@/dev/%k.service" ACTION=="remove", RUN+="/usr/bin/systemctl stop udevil-mount@/dev/%k.service"
GOTO="exit" GOTO="exit"

View File

@ -19,6 +19,9 @@
# only do anything on block devices which are not removed # only do anything on block devices which are not removed
ACTION!="add|change", GOTO="cdrom_end" ACTION!="add|change", GOTO="cdrom_end"
# /dev/sr, /dev/sr_mod, /dev/srcutree are not valid
KERNEL=="sr|sr_mod|srcutree", GOTO="cdrom_end"
# set CDROM speed # set CDROM speed
KERNEL=="sr*", RUN+="/sbin/hdparm -E8 /dev/%k" KERNEL=="sr*", RUN+="/sbin/hdparm -E8 /dev/%k"