Now that we're finished building autonomous repair, enable the service
on the root filesystem by default. The root filesystem is mounted by
the initrd prior to starting systemd, which is why the udev rule cannot
autostart the service for the root filesystem.
dh_installsystemd won't activate a template service (aka one with an
at-sign in the name) even if it provides a DefaultInstance directive to
make that possible. Use a fugly shim for this.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Package: xfsprogs
Depends: ${shlibs:Depends}, ${misc:Depends}, python3-dbus, python3:any
Provides: fsck-backend
-Suggests: xfsdump, acl, attr, quota
+Suggests: xfsdump, acl, attr, quota, python3-jsonschema
Breaks: xfsdump (<< 3.0.0)
Replaces: xfsdump (<< 3.0.0)
Architecture: linux-any
esac
#DEBHELPER#
+#
+# dh_installsystemd doesn't handle template services even if we supply a
+# default instance, so we'll install it here.
+if [ -z "${DPKG_ROOT:-}" ] && [ -d /run/systemd/system ] ; then
+ if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
+ /bin/systemctl enable xfs_scrubbed@.service || true
+ fi
+fi
exit 0
--- /dev/null
+#!/bin/sh
+
+set -e
+
+# dh_installsystemd doesn't handle template services even if we supply a
+# default instance, so we'll install it here.
+if [ -z "${DPKG_ROOT:-}" ] && [ "$1" = remove ] && [ -d /run/systemd/system ] ; then
+ /bin/systemctl disable xfs_scrubbed@.service || true
+fi
+
+#DEBHELPER#
+
+exit 0
Type=exec
Environment=SERVICE_MODE=1
ExecCondition=@pkg_libexec_dir@/xfs_scrubbed --check %f
-ExecStart=@pkg_libexec_dir@/xfs_scrubbed --log %f
+ExecStart=@pkg_libexec_dir@/xfs_scrubbed --autofsck --log %f
SyslogIdentifier=%N
# Run scrub with minimal CPU and IO priority so that nothing else will starve.