Am 06.06.2014 13:56, schrieb Michael Meskes: > Hi Michael, > >> I think it’d be better if you posted what you already have and what >> problem you are trying to solve. > > Sure, no problem. Here's what I have: > > --- > [Unit] > Description=Check And Enable File System Quotas > Documentation=man:quotaon(8) > DefaultDependencies=no > After=systemd-readahead-collect.service systemd-readahead-replay.service > systemd-remount-fs.service
This is a bit odd. > Before=local-fs.target shutdown.target Why the shutdown.target here? And do you really want to run the quota script *before* the local file systems have been mounted? > ConditionPathExists=/usr/share/quota/quotaon.sh That seems unnecessary. Since the service file is in /lib, it will be removed along with the quotaon.sh script. So I don't see the need to explicitly test for it. > > [Service] > Type=oneshot > RemainAfterExit=yes > ExecStart=/usr/share/quota/quotaon.sh > ExecStop=/usr/share/quota/quotaoff.sh > StandardOutput=journal+console Is there a need to divert from the default StandardOutput setting? > > [Install] > WantedBy=sysinit.target > --- > > AFAICT this works nicely on boot and on manual invocation after deactivating > the systemd provided quotaon.service. What I'm trying to figure out is how to > make sure my stop script gets called upon rebooting or halting. If you have DefaultDependencies=no and you want to have your service stopped on shutdown, add Conflicts=shutdown.target > Also I have to figure out whether to integrate the logic of the systemd > provided quotacheck.service and if so, how to. But first I got to get it > running. I think what's important is to avoid duplicating any functionality between what is already provided by systemd. -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Pkg-systemd-maintainers mailing list Pkg-systemd-maintainers@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-systemd-maintainers