[pve-devel] applied-partially: [PATCH pve-manager 7/8] debian/postinst: fix shellcheck warning

Fabian Grünbichler f.gruenbichler at proxmox.com
Wed Jan 31 14:16:44 CET 2024


On January 30, 2024 7:40 pm, Max Carrara wrote:
> SC3043 (warning): In POSIX sh, 'local' is undefined.

while I get why you sent this here, it's not related at all to this
series, please send such changes on their own and reference them if
needed in the future.

in this case it's actually not needed at all:
https://www.debian.org/doc/debian-policy/ch-files.html#s-scripts

local is pretty much impemented by every shell under the sun, it's just
that POSIX couldn't agree how to handle them when `unset` is called, so
they are not part of POSIX.

> Signed-off-by: Max Carrara <m.carrara at proxmox.com>
> ---
>  debian/postinst | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/debian/postinst b/debian/postinst
> index 6138ef6d..00d5f2cc 100755
> --- a/debian/postinst
> +++ b/debian/postinst
> @@ -9,7 +9,7 @@ set -e
>  # installed and configured.
>  
>  set_lvm_conf() {
> -    local FORCE="$1"
> +    FORCE="$1"
>      LVM_CONF_MARKER="# added by pve-manager to avoid scanning"
>  
>      # keep user changes afterwards provided marker is still there..
> -- 
> 2.39.2
> 
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel at lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 
> 
> 




More information about the pve-devel mailing list