Skip to content

Commit

Permalink
Add conditional chkconfig to packaging
Browse files Browse the repository at this point in the history
Prior to adopting the kmod style packaging the zfs packages
would conditionally invoke /sbin/chkconfig to create the
proper links for the init script.  This is done conditionally
because many distributions are moving away from SysV style
init scripts and we don't want to cause errors on those.

Signed-off-by: Brian Behlendorf <[email protected]>
Closes openzfs#1376
  • Loading branch information
behlendorf committed Jul 3, 2013
1 parent e9832eb commit ba661a6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion rpm/generic/zfs.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,14 @@ make %{?_smp_mflags}
make install DESTDIR=%{?buildroot}
find %{?buildroot}%{_libdir} -name '*.la' -exec rm -f {} \;

%post -p /sbin/ldconfig
%post
/sbin/ldconfig
[ -x /sbin/chkconfig ] && /sbin/chkconfig --add zfs

%preun
if [ $1 -eq 0 ] ; then
[ -x /sbin/chkconfig ] && /sbin/chkconfig --del zfs
fi

%postun -p /sbin/ldconfig

Expand Down

0 comments on commit ba661a6

Please sign in to comment.