diff --git a/archiso/initcpio/hooks/archiso b/archiso/initcpio/hooks/archiso index 44abb88613b6b7f55e4f6cd1571e200fa4c78c3c..7f2f9a7e2acd018727f4d320aa5d6abdc7bf6e55 100644 --- a/archiso/initcpio/hooks/archiso +++ b/archiso/initcpio/hooks/archiso @@ -63,7 +63,8 @@ _mnt_sfs() { local img_fullname="${img##*/}" local sfs_dev - # shellcheck disable=SC2154 # defined via initcpio's parse_cmdline() + # shellcheck disable=SC2154 + # defined via initcpio's parse_cmdline() if [ "${copytoram}" = "y" ]; then msg -n ":: Copying squashfs image to RAM..." if ! cp -- "${img}" "/run/archiso/copytoram/${img_fullname}" ; then @@ -129,10 +130,12 @@ run_hook() { [ -z "${copytoram_size}" ] && copytoram_size="75%" [ -z "${archisobasedir}" ] && archisobasedir="arch" [ -z "${dm_snap_prefix}" ] && dm_snap_prefix="arch" - # shellcheck disable=SC2154 # defined via initcpio's parse_cmdline() + # shellcheck disable=SC2154 + # defined via initcpio's parse_cmdline() [ -z "${archisodevice}" ] && archisodevice="/dev/disk/by-label/${archisolabel}" [ -z "${cow_spacesize}" ] && cow_spacesize="256M" - # shellcheck disable=SC2154 # defined via initcpio's parse_cmdline() + # shellcheck disable=SC2154 + # defined via initcpio's parse_cmdline() if [ -n "${cow_label}" ]; then cow_device="/dev/disk/by-label/${cow_label}" [ -z "${cow_persistent}" ] && cow_persistent="P" @@ -163,7 +166,8 @@ archiso_mount_handler() { fi fi - # shellcheck disable=SC2154 # defined via initcpio's parse_cmdline() + # shellcheck disable=SC2154 + # defined via initcpio's parse_cmdline() if [ "${checksum}" = "y" ]; then if [ -f "/run/archiso/bootmnt/${archisobasedir}/${arch}/airootfs.sha512" ]; then msg -n ":: Self-test requested, please wait..." @@ -180,7 +184,8 @@ archiso_mount_handler() { fi fi - # shellcheck disable=SC2154 # defined via initcpio's parse_cmdline() + # shellcheck disable=SC2154 + # defined via initcpio's parse_cmdline() if [ "${verify}" = "y" ]; then if [ -f "/run/archiso/bootmnt/${archisobasedir}/${arch}/airootfs.sfs.sig" ]; then msg -n ":: Signature verification requested, please wait..." diff --git a/archiso/initcpio/hooks/archiso_loop_mnt b/archiso/initcpio/hooks/archiso_loop_mnt index c32a544fb3b034ec29f750758ee56a226a2174fd..2c607f50fccdef1dcb741f481737011038545e75 100644 --- a/archiso/initcpio/hooks/archiso_loop_mnt +++ b/archiso/initcpio/hooks/archiso_loop_mnt @@ -1,10 +1,12 @@ #!/bin/ash run_hook () { - # shellcheck disable=SC2154 # defined via initcpio's parse_cmdline() + # shellcheck disable=SC2154 + # defined via initcpio's parse_cmdline() [ -n "${img_label}" ] && img_dev="/dev/disk/by-label/${img_label}" [ -z "${img_flags}" ] && img_flags="defaults" - # shellcheck disable=SC2154 # defined via initcpio's parse_cmdline() + # shellcheck disable=SC2154 + # defined via initcpio's parse_cmdline() if [ -n "${img_dev}" ] && [ -n "${img_loop}" ]; then export mount_handler="archiso_loop_mount_handler" fi @@ -17,7 +19,8 @@ archiso_loop_mount_handler () { msg ":: Setup a loop device from ${img_loop} located at device ${img_dev}" _mnt_dev "${img_dev}" "/run/archiso/img_dev" "-r" "${img_flags}" - # shellcheck disable=SC2154 # defined via initcpio's parse_cmdline() + # shellcheck disable=SC2154 + # defined via initcpio's parse_cmdline() if [ "${copytoram}" != "y" ]; then readlink -f "${img_dev}" >> /run/archiso/used_block_devices fi diff --git a/archiso/initcpio/hooks/archiso_pxe_common b/archiso/initcpio/hooks/archiso_pxe_common index e31903e95c8be076e340bb6ffccc5d5e6571f367..bf8e8838952b95e80477275f53d43655df0d2d22 100644 --- a/archiso/initcpio/hooks/archiso_pxe_common +++ b/archiso/initcpio/hooks/archiso_pxe_common @@ -11,7 +11,8 @@ run_hook () { if [ -n "${ip}" ]; then if [ -n "${BOOTIF}" ]; then bootif_mac="${BOOTIF#01-}" - # shellcheck disable=SC2169 # ash supports bash-like string replacment + # shellcheck disable=SC2169 + # ash supports bash-like string replacment bootif_mac="${bootif_mac//-/:}" for i in /sys/class/net/*/address; do read -r net_mac < "${i}" @@ -36,7 +37,8 @@ run_hook () { launch_interactive_shell fi - # shellcheck disable=SC1090 # ipconfig generates these files + # shellcheck disable=SC1090 + # ipconfig generates these files . /tmp/net-*.conf export pxeserver="${ROOTSERVER}" @@ -60,7 +62,8 @@ run_latehook () { if [ -n "${ip}" ]; then [ -z "${copy_resolvconf}" ] && copy_resolvconf="y" - # shellcheck disable=SC2154 # defined via initcpio's parse_cmdline() + # shellcheck disable=SC2154 + # defined via initcpio's parse_cmdline() if [ "${copytoram}" = "y" ]; then if [ -n "${bootif_dev}" ]; then ip addr flush dev "${bootif_dev}" diff --git a/archiso/initcpio/hooks/archiso_pxe_http b/archiso/initcpio/hooks/archiso_pxe_http index 5e55356d33c37c5f846ac17948588cbe28d64a22..bf2f5f40295195c7d9d6f2b8e9ea3dfe2820b1b6 100644 --- a/archiso/initcpio/hooks/archiso_pxe_http +++ b/archiso/initcpio/hooks/archiso_pxe_http @@ -1,7 +1,8 @@ #!/bin/ash run_hook() { - # shellcheck disable=SC2154 # defined via initcpio's parse_cmdline() + # shellcheck disable=SC2154 + # defined via initcpio's parse_cmdline() if [ -n "${ip}" ] && [ -n "${archiso_http_srv}" ]; then # booting with http is always copy-to-ram, so set here to make sure @@ -24,7 +25,8 @@ _curl_get() { local _dst="${2}" msg ":: Downloading '${_url}'" - # shellcheck disable=SC2154 # defined via initcpio's parse_cmdline() + # shellcheck disable=SC2154 + # defined via initcpio's parse_cmdline() if ! curl -L -f -o "/run/archiso/httpspace/${archisobasedir}${_dst}/${_url##*/}" --create-dirs "${_url}"; then echo "ERROR: Downloading '${_url}'" echo " Falling back to interactive prompt" @@ -40,14 +42,17 @@ archiso_pxe_http_mount_handler () { mkdir -p "/run/archiso/httpspace" mount -t tmpfs -o size="${archiso_http_spc}",mode=0755 httpspace "/run/archiso/httpspace" - # shellcheck disable=SC2154 # defined via initcpio's parse_cmdline() + # shellcheck disable=SC2154 + # defined via initcpio's parse_cmdline() _curl_get "${archiso_http_srv}${archisobasedir}/${arch}/airootfs.sfs" "/${arch}" - # shellcheck disable=SC2154 # defined via initcpio's parse_cmdline() + # shellcheck disable=SC2154 + # defined via initcpio's parse_cmdline() if [ "${checksum}" = "y" ]; then _curl_get "${archiso_http_srv}${archisobasedir}/${arch}/airootfs.sha512" "/${arch}" fi - # shellcheck disable=SC2154 # defined via initcpio's parse_cmdline() + # shellcheck disable=SC2154 + # defined via initcpio's parse_cmdline() if [ "${verify}" = "y" ]; then _curl_get "${archiso_http_srv}${archisobasedir}/${arch}/airootfs.sfs.sig" "/${arch}" fi diff --git a/archiso/initcpio/hooks/archiso_pxe_nbd b/archiso/initcpio/hooks/archiso_pxe_nbd index ce93080c78b98459398a6921e7b14260aa972d87..4ccbcbf4e847d920a2d4fcf068d36d06cce15f0b 100644 --- a/archiso/initcpio/hooks/archiso_pxe_nbd +++ b/archiso/initcpio/hooks/archiso_pxe_nbd @@ -1,7 +1,8 @@ #!/bin/ash run_earlyhook() { - # shellcheck disable=SC2154 # defined via initcpio's parse_cmdline() + # shellcheck disable=SC2154 + # defined via initcpio's parse_cmdline() if [ -n "${ip}" ] && [ -n "${archiso_nbd_srv}" ]; then # Module autoloading like with loop devices does not work, doing manually... modprobe nbd 2> /dev/null diff --git a/archiso/initcpio/hooks/archiso_pxe_nfs b/archiso/initcpio/hooks/archiso_pxe_nfs index 406541b3dd5b76876d8ad5639bca6d1e97955bcb..be1e4c35b0f123dd69ea3744e86bfaa9e23ce806 100644 --- a/archiso/initcpio/hooks/archiso_pxe_nfs +++ b/archiso/initcpio/hooks/archiso_pxe_nfs @@ -1,7 +1,8 @@ #!/bin/ash run_hook() { - # shellcheck disable=SC2154 # defined via initcpio's parse_cmdline() + # shellcheck disable=SC2154 + # defined via initcpio's parse_cmdline() if [ -n "${ip}" ] && [ -n "${archiso_nfs_srv}" ]; then archiso_nfs_srv=$(eval echo "${archiso_nfs_srv}") @@ -15,7 +16,8 @@ archiso_nfs_mount_handler() { newroot="${1}" mkdir -p "/run/archiso/bootmnt" msg ":: Mounting '${archiso_nfs_srv}'" - # shellcheck disable=SC2154 # defined via initcpio's parse_cmdline() + # shellcheck disable=SC2154 + # defined via initcpio's parse_cmdline() if [ -n "${archiso_nfs_opt}" ]; then nfsmount -o "${archiso_nfs_opt}" "${archiso_nfs_srv}" "/run/archiso/bootmnt" mount_status=$?