]> granicus.if.org Git - zfs/commitdiff
Fix zfs .deb package warning in prerm script
authorLOLi <loli10K@users.noreply.github.com>
Tue, 9 May 2017 18:51:40 +0000 (20:51 +0200)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 9 May 2017 18:51:40 +0000 (11:51 -0700)
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 <mail@gmelikov.ru>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes #6108

rpm/generic/zfs.spec.in

index bab7c5c61dcc708ce79631ce3cb9eddaa0bc0f23..2ad4b693c1b511b95c694862c7026243411c7453 100644 (file)
@@ -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