service file docs?

Michael Meskes meskes at debian.org
Sat Jun 7 09:42:44 BST 2014


> > [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?

Actually no, I want to run it immediately *after* the filesystems have been
mounted. However, both these lines are taken from the quotaon.service file
that's provided by systemd itself. So is this buggy, too, or does it serve a
different purpose, like only enabling quota for the root fs?

> > 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.

Sorry, I don't understand that. /usr could be on a different partition, couldn't 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?

Firstly I want this for testing. Secondly I wonder if we should keep it in
regardless. For quota to work correctly quotacheck has to be run directly
before quotaon i issued. Therefore it makes a lot of sense to combine both into
one file, as we've done every since the package was introduced to Debian. So
the name quotaon.sh is kind of misleading as it also checks the fs when needed.
Anyway, quotacheck might be quite time consuming and if we do not tell the user
what's going on this might get pretty confusing.

> I think what's important is to avoid duplicating any functionality
> between what is already provided by systemd.

I absolutely agree. 

Michael
-- 
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Michael at BorussiaFan dot De, Meskes at (Debian|Postgresql) dot Org
Jabber: michael.meskes at gmail dot com
VfL Borussia! Força Barça! Go SF 49ers! Use Debian GNU/Linux, PostgreSQL




More information about the Pkg-systemd-maintainers mailing list