From ArchWiki
Jump to: navigation, search

Can't udev rule directly run a script?

PulseAudio/Examples#Automatically switch audio to HDMI states that
Note: udev rule can't directly run a script, a workaround is to use a .service to run this script

Aren't there some examples for scripts in udev? Regid (talk) 18:53, 17 July 2017 (UTC)

The warning in Udev#Writing_udev_rules mentions that udev can't run long-running tasks. Otherwise, it doesn't matter what it runs. -- Lahwaacz (talk) 19:25, 29 July 2017 (UTC)
But this is not really a long running task, so why not directly call it with "/bin/bash /usr/local/bin/" -- Blomblom (talk) 07:18, 25 May 2018 (UTC)