Skip to content

Commit

Permalink
updated makfile and spec files to start zfs-scrub services on install
Browse files Browse the repository at this point in the history
  • Loading branch information
bkelly16 committed Jan 15, 2025
1 parent 871b5a4 commit a9f68ef
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ install:
udev/68-vdev.rules
install -m 644 -t "$(DESTDIR)/opt/45drives/tools" \
udev/68-vdev.rules
install -D -m 644 zfs-scrub.timer "$(DESTDIR)"/etc/systemd/system/zfs-scrub.timer
install -D -m 644 zfs-scrub.service "$(DESTDIR)"/etc/systemd/system/zfs-scrub.service

ifdef TOOLS_VERSION
echo $(TOOLS_VERSION) > "$(DESTDIR)/etc/45drives/server_info/tools_version"
endif
Expand Down
11 changes: 11 additions & 0 deletions packaging/el8/main.spec
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ Conflicts: %{name}-1.7
%install
make DESTDIR=%{buildroot} TOOLS_VERSION="%{version}-::package_build_version::" install

%post
%{?systemd_post zfs-scrub.timer}

%preun
%{?systemd_preun zfs-scrub.timer}

%postun
if [ $1 == 0 ];then
rm -rf /opt/45drives/tools
Expand All @@ -49,6 +55,9 @@ if [ $1 == 0 ];then
fi
fi

%postun
%{?systemd_postun_with_restart zfs-scrub.timer}

%files
%dir /opt/45drives/tools
%dir /opt/45drives/dalias
Expand All @@ -59,6 +68,8 @@ fi
/opt/45drives/tools/*
/opt/45drives/ubm/*
/opt/45drives/dalias/*
/etc/systemd/system/zfs-scrub.timer
/etc/systemd/system/zfs-scrub.service
%{_bindir}/*
/usr/lib/udev/rules.d/*

Expand Down

0 comments on commit a9f68ef

Please sign in to comment.