mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-10-03 05:20:00 +00:00
nixos/displaylink: fix with strict shellcheck
using the displaylink module currently fails with `systemd.enableStrictShellChecks = true;`. there are two warnings: - `read` without `-r` can technically mangle backslashes, as it acts as an escape character by default. as far as we can tell, this shouldn't cause problems, but it seems like a harmless and technically-correct fix. - `SUSPEND_RESULT` is unused. as far as i can tell, this indeed seems to be the case, so this makes sense to remove.
This commit is contained in:
@@ -46,7 +46,7 @@ in
|
||||
|
||||
powerManagement.powerDownCommands = ''
|
||||
#flush any bytes in pipe
|
||||
while read -n 1 -t 1 SUSPEND_RESULT < /tmp/PmMessagesPort_out; do : ; done;
|
||||
while read -r -n 1 -t 1 < /tmp/PmMessagesPort_out; do : ; done;
|
||||
|
||||
#suspend DisplayLinkManager
|
||||
echo "S" > /tmp/PmMessagesPort_in
|
||||
@@ -54,7 +54,7 @@ in
|
||||
#wait until suspend of DisplayLinkManager finish
|
||||
if [ -f /tmp/PmMessagesPort_out ]; then
|
||||
#wait until suspend of DisplayLinkManager finish
|
||||
read -n 1 -t 10 SUSPEND_RESULT < /tmp/PmMessagesPort_out
|
||||
read -r -n 1 -t 10 < /tmp/PmMessagesPort_out
|
||||
fi
|
||||
'';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user