Skip to content

Commit

Permalink
Fix zfs .deb package warning in prerm script
Browse files Browse the repository at this point in the history
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
  • Loading branch information
loli10K authored and behlendorf committed May 9, 2017
1 parent 3e2ecae commit 4e3de24
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rpm/generic/zfs.spec.in
Expand Up @@ -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
Expand Down

0 comments on commit 4e3de24

Please sign in to comment.