mirror of
https://github.com/systemd/systemd.git
synced 2025-03-19 22:50:17 +03:00
mount: pull in quota services from local mountpoints with usr/grpquota options
This commit is contained in:
parent
9700edb4e8
commit
0c380104cf
@ -1327,10 +1327,6 @@ install-data-hook:
|
||||
$(LN_S) $(systemunitdir)/getty@.service getty@tty4.service && \
|
||||
$(LN_S) $(systemunitdir)/getty@.service getty@tty5.service && \
|
||||
$(LN_S) $(systemunitdir)/getty@.service getty@tty6.service )
|
||||
( cd $(DESTDIR)$(pkgsysconfdir)/system/local-fs.target.wants && \
|
||||
rm -f quotaon.service quotacheck.service && \
|
||||
$(LN_S) $(systemunitdir)/quotacheck.service quotacheck.service && \
|
||||
$(LN_S) $(systemunitdir)/quotaon.service quotaon.service )
|
||||
( cd $(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants && \
|
||||
rm -f remote-fs.target && \
|
||||
$(LN_S) $(systemunitdir)/remote-fs.target remote-fs.target )
|
||||
|
17
src/mount.c
17
src/mount.c
@ -413,9 +413,22 @@ static int mount_add_default_dependencies(Mount *m) {
|
||||
|
||||
if (m->meta.manager->running_as == MANAGER_SYSTEM &&
|
||||
!path_equal(m->where, "/")) {
|
||||
MountParameters *p;
|
||||
|
||||
if ((r = unit_add_dependency_by_name(UNIT(m), UNIT_BEFORE, SPECIAL_QUOTACHECK_SERVICE, NULL, true)) < 0)
|
||||
return r;
|
||||
if (m->from_fragment)
|
||||
p = &m->parameters_fragment;
|
||||
else if (m->from_etc_fstab)
|
||||
p = &m->parameters_etc_fstab;
|
||||
else
|
||||
p = NULL;
|
||||
|
||||
if (!p ||
|
||||
(!mount_test_option(p->options, "_netdev") &&
|
||||
!(p->fstype && fstype_is_network(p->fstype)) &&
|
||||
(mount_test_option(p->options, "usrquota") || mount_test_option(p->options, "grpquota"))))
|
||||
if ((r = unit_add_two_dependencies_by_name(UNIT(m), UNIT_BEFORE, UNIT_WANTS, SPECIAL_QUOTACHECK_SERVICE, NULL, true)) < 0 ||
|
||||
(r = unit_add_two_dependencies_by_name(UNIT(m), UNIT_BEFORE, UNIT_WANTS, SPECIAL_QUOTAON_SERVICE, NULL, true)) < 0)
|
||||
return r;
|
||||
|
||||
if ((r = unit_add_two_dependencies_by_name(UNIT(m), UNIT_BEFORE, UNIT_CONFLICTS, SPECIAL_UMOUNT_TARGET, NULL, true)) < 0)
|
||||
return r;
|
||||
|
@ -62,6 +62,7 @@
|
||||
/* Magic early boot services */
|
||||
#define SPECIAL_FSCK_SERVICE "fsck@.service"
|
||||
#define SPECIAL_QUOTACHECK_SERVICE "quotacheck.service"
|
||||
#define SPECIAL_QUOTAON_SERVICE "quotaon.service"
|
||||
#define SPECIAL_REMOUNT_ROOTFS_SERVICE "remount-rootfs.service"
|
||||
|
||||
/* Services systemd relies on */
|
||||
|
@ -18,6 +18,3 @@ RemainAfterExit=yes
|
||||
ExecStart=@rootlibexecdir@/systemd-quotacheck
|
||||
StandardOutput=syslog
|
||||
TimeoutSec=0
|
||||
|
||||
[Install]
|
||||
WantedBy=local-fs.target
|
||||
|
@ -17,6 +17,3 @@ Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/sbin/quotaon -aug
|
||||
StandardOutput=syslog
|
||||
|
||||
[Install]
|
||||
WantedBy=local-fs.target
|
||||
|
Loading…
x
Reference in New Issue
Block a user