diff --git a/hooks/eudev/eudev b/hooks/eudev/eudev index 1700900..563d5f6 100644 --- a/hooks/eudev/eudev +++ b/hooks/eudev/eudev @@ -1,7 +1,7 @@ # vim: set ft=sh: # shellcheck shell=sh # -# false positive +# https://www.shellcheck.net/wiki/SC2154 # shellcheck disable=2154 for _binary in udevd udevadm; do diff --git a/hooks/eudev/eudev.init b/hooks/eudev/eudev.init index e204e43..de76644 100644 --- a/hooks/eudev/eudev.init +++ b/hooks/eudev/eudev.init @@ -1,8 +1,8 @@ # vim: set ft=sh: # shellcheck shell=sh # -# false positive -# shellcheck disable=2154,2034 +# https://www.shellcheck.net/wiki/SC2154 +# shellcheck disable=2154 [ "$break" = eudev ] && { print "break before eudev.init"; sh; } diff --git a/hooks/eudev/eudev.init.late b/hooks/eudev/eudev.init.late index e25dd43..0d52c08 100644 --- a/hooks/eudev/eudev.init.late +++ b/hooks/eudev/eudev.init.late @@ -1,7 +1,4 @@ # vim: set ft=sh: # shellcheck shell=sh -# -# false positive -# shellcheck disable=2154 udevadm control -e diff --git a/hooks/keymap/keymap b/hooks/keymap/keymap index ef40ce3..99c2b5f 100644 --- a/hooks/keymap/keymap +++ b/hooks/keymap/keymap @@ -1,7 +1,7 @@ # vim: set ft=sh: # shellcheck shell=sh # -# false positive +# https://www.shellcheck.net/wiki/SC2154 # shellcheck disable=2154 copy_file "$keymap_path" "$keymap_path" 644 0 diff --git a/hooks/keymap/keymap.init b/hooks/keymap/keymap.init index 88e789d..79d07c5 100644 --- a/hooks/keymap/keymap.init +++ b/hooks/keymap/keymap.init @@ -1,9 +1,10 @@ # vim: set ft=sh: # shellcheck shell=sh # -# false positive +# https://www.shellcheck.net/wiki/SC2154 # shellcheck disable=2154 [ "$break" = keymap ] && { print "break before keymap.init"; sh; } +# TODO support loadkeys loadkmap < "$keymap_path" diff --git a/hooks/luks/luks b/hooks/luks/luks index 5203787..2faae55 100644 --- a/hooks/luks/luks +++ b/hooks/luks/luks @@ -1,7 +1,7 @@ # vim: set ft=sh: # shellcheck shell=sh # -# false positive +# https://www.shellcheck.net/wiki/SC2154 # shellcheck disable=2154 [ "$luks_key" ] && { @@ -30,8 +30,7 @@ copy_module "$_module" done -# avoid possible issues with libgcc_s.so.1 -# see https://bugs.archlinux.org/task/56771 +# https://bugs.archlinux.org/task/56771 [ -e /lib/libgcc_s.so.1 ] && copy_file /lib/libgcc_s.so.1 /lib/libgcc_s.so.1 755 1 copy_binary cryptsetup diff --git a/hooks/luks/luks.init b/hooks/luks/luks.init index 5e00c88..04b610d 100644 --- a/hooks/luks/luks.init +++ b/hooks/luks/luks.init @@ -1,21 +1,17 @@ # vim: set ft=sh: # shellcheck shell=sh # -# false positive +# https://www.shellcheck.net/wiki/SC2154 # shellcheck disable=2154 -# -# word splitting is safe by design -# shellcheck disable=2068 [ "$break" = luks ] && { print "break before luks.init"; sh; } -export DM_DISABLE_UDEV=1 mkdir -p /run/cryptsetup resolve_device "$luks_root" -set -- \ - "${luks_discard:+--allow-discards}" "${luks_header:+--header $luks_header}" \ - "${luks_key:+-d $luks_key}" "$device" "${luks_name:-crypt-${device##*/}}" - -cryptsetup open $@ || panic "failed to unlock LUKS" +DM_DISABLE_UDEV=1 cryptsetup open \ + "${luks_discard:+--allow-discards}" \ + "${luks_header:+--header=$luks_header}" \ + "${luks_key:+--key-file=$luks_key}" -- "$device" \ + "${luks_name:-crypt-${device##*/}}" || panic "failed to unlock LUKS" diff --git a/hooks/lvm/lvm b/hooks/lvm/lvm index bdb154e..6c757ae 100644 --- a/hooks/lvm/lvm +++ b/hooks/lvm/lvm @@ -1,7 +1,7 @@ # vim: set ft=sh: # shellcheck shell=sh # -# false positive +# https://www.shellcheck.net/wiki/SC2154 # shellcheck disable=2154 [ "$hostonly" = 1 ] && diff --git a/hooks/lvm/lvm.init b/hooks/lvm/lvm.init index c7063d9..73d8ec3 100644 --- a/hooks/lvm/lvm.init +++ b/hooks/lvm/lvm.init @@ -1,11 +1,9 @@ # vim: set ft=sh: # shellcheck shell=sh # -# false positive -# shellcheck disable=2154 -# -# word splitting is safe by design -# shellcheck disable=2068 +# https://www.shellcheck.net/wiki/SC2154 +# https://www.shellcheck.net/wiki/SC2068 +# shellcheck disable=2154,2068 [ "$break" = lvm ] && { print "break before lvm.init"; sh; } diff --git a/hooks/mdev/mdev b/hooks/mdev/mdev index 97c25aa..4c1c16e 100644 --- a/hooks/mdev/mdev +++ b/hooks/mdev/mdev @@ -1,7 +1,8 @@ # vim: set ft=sh: # shellcheck shell=sh # -# false positive +# https://www.shellcheck.net/wiki/SC2154 +# https://www.shellcheck.net/wiki/SC2016 # shellcheck disable=2154,2016 for _binary in mdev find; do diff --git a/hooks/mdev/mdev.init b/hooks/mdev/mdev.init index 9398096..b314922 100644 --- a/hooks/mdev/mdev.init +++ b/hooks/mdev/mdev.init @@ -1,7 +1,8 @@ # vim: set ft=sh: # shellcheck shell=sh # -# false positive +# https://www.shellcheck.net/wiki/SC2154 +# https://www.shellcheck.net/wiki/SC2034 # shellcheck disable=2154,2034 [ "$break" = mdev ] && { print "break before mdev.init"; sh; } diff --git a/hooks/mdev/mdev.init.late b/hooks/mdev/mdev.init.late index 975bdbe..86d18da 100644 --- a/hooks/mdev/mdev.init.late +++ b/hooks/mdev/mdev.init.late @@ -1,7 +1,7 @@ # vim: set ft=sh: # shellcheck shell=sh # -# false positive +# https://www.shellcheck.net/wiki/SC2154 # shellcheck disable=2154 kill "$mdev_pid" diff --git a/hooks/mdevd/mdevd b/hooks/mdevd/mdevd index a591024..fba6808 100644 --- a/hooks/mdevd/mdevd +++ b/hooks/mdevd/mdevd @@ -1,7 +1,8 @@ # vim: set ft=sh: # shellcheck shell=sh # -# false positive +# https://www.shellcheck.net/wiki/SC2154 +# https://www.shellcheck.net/wiki/SC2016 # shellcheck disable=2154,2016 for _binary in mdevd mdevd-coldplug; do diff --git a/hooks/mdevd/mdevd.init b/hooks/mdevd/mdevd.init index 495a0f7..397ce45 100644 --- a/hooks/mdevd/mdevd.init +++ b/hooks/mdevd/mdevd.init @@ -1,7 +1,8 @@ # vim: set ft=sh: # shellcheck shell=sh # -# false positive +# https://www.shellcheck.net/wiki/SC2154 +# https://www.shellcheck.net/wiki/SC2034 # shellcheck disable=2154,2034 [ "$break" = mdevd ] && { print "break before mdevd.init"; sh; } diff --git a/hooks/mdevd/mdevd.init.late b/hooks/mdevd/mdevd.init.late index 03894b3..25b5d40 100644 --- a/hooks/mdevd/mdevd.init.late +++ b/hooks/mdevd/mdevd.init.late @@ -1,7 +1,7 @@ # vim: set ft=sh: # shellcheck shell=sh # -# false positive +# https://www.shellcheck.net/wiki/SC2154 # shellcheck disable=2154 kill "$mdevd_pid" diff --git a/hooks/proc/proc.init b/hooks/proc/proc.init index f5fdf15..1b39c1b 100644 --- a/hooks/proc/proc.init +++ b/hooks/proc/proc.init @@ -1,14 +1,14 @@ # vim: set ft=sh: # shellcheck shell=sh # -# false positive +# https://www.shellcheck.net/wiki/SC2154 # shellcheck disable=2154 [ "$break" = proc ] && { print "break before proc.init"; sh; } command -v device-helper > /proc/sys/kernel/hotplug -# get ready for fork bomb. kek +# Prepare for fork bomb! find /sys/devices -name uevent | while read -r uevent; do diff --git a/hooks/systemd-udevd/systemd-udevd b/hooks/systemd-udevd/systemd-udevd index ef62f02..49a4369 100644 --- a/hooks/systemd-udevd/systemd-udevd +++ b/hooks/systemd-udevd/systemd-udevd @@ -1,7 +1,7 @@ # vim: set ft=sh: # shellcheck shell=sh # -# false positive +# https://www.shellcheck.net/wiki/SC2154 # shellcheck disable=2154 for _binary in /lib/systemd/systemd-udevd udevadm; do diff --git a/hooks/systemd-udevd/systemd-udevd.init b/hooks/systemd-udevd/systemd-udevd.init index ec483b6..e5ba419 100644 --- a/hooks/systemd-udevd/systemd-udevd.init +++ b/hooks/systemd-udevd/systemd-udevd.init @@ -1,8 +1,8 @@ # vim: set ft=sh: # shellcheck shell=sh # -# false positive -# shellcheck disable=2154,2034 +# https://www.shellcheck.net/wiki/SC2154 +# shellcheck disable=2154 [ "$break" = systemd-udevd ] && { print "break before systemd-udevd.init"; sh; } diff --git a/hooks/systemd-udevd/systemd-udevd.init.late b/hooks/systemd-udevd/systemd-udevd.init.late index e25dd43..0d52c08 100644 --- a/hooks/systemd-udevd/systemd-udevd.init.late +++ b/hooks/systemd-udevd/systemd-udevd.init.late @@ -1,7 +1,4 @@ # vim: set ft=sh: # shellcheck shell=sh -# -# false positive -# shellcheck disable=2154 udevadm control -e