From: LOLi Date: Tue, 9 May 2017 18:51:40 +0000 (+0200) Subject: Fix zfs .deb package warning in prerm script X-Git-Tag: zfs-0.7.0-rc5~107 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4e3de24b61b9116f0138d22ec687d0a759b29967;p=zfs Fix zfs .deb package warning in prerm script Debian zfs package generated by alien doesn't call the prerm script (rpm's %preun) with an integer as first parameter, which results in the following warning: "zfs.prerm: line 2: [: remove: integer expression expected" Modify the if-condition to avoid the warning. Reviewed-by: George Melikov Reviewed-by: Giuseppe Di Natale Reviewed-by: Brian Behlendorf Signed-off-by: loli10K Closes #6108 --- diff --git a/rpm/generic/zfs.spec.in b/rpm/generic/zfs.spec.in index bab7c5c61..2ad4b693c 100644 --- a/rpm/generic/zfs.spec.in +++ b/rpm/generic/zfs.spec.in @@ -257,7 +257,7 @@ exit 0 %if 0%{?_systemd} %systemd_preun %{systemd_svcs} %else -if [ $1 -eq 0 ] && [ -x /sbin/chkconfig ]; then +if [ "$1" = "0" ] && [ -x /sbin/chkconfig ]; then /sbin/chkconfig --del zfs-import /sbin/chkconfig --del zfs-mount /sbin/chkconfig --del zfs-share