[PATCH] debian: Fix fsck/checkroot/checkfs/syinit order
Santi
santi at agolina.net
Fri Sep 10 16:44:54 PDT 2010
Properly order these units so that the a partition is not mount
before the fsck is done in a Debian system.
---
Makefile.am | 6 +++++-
units/debian/fsck.target | 2 ++
2 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index e1fe9e6..c1c2432 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -966,7 +966,8 @@ if TARGET_GENTOO
endif
if TARGET_DEBIAN
$(MKDIR_P) -m 0755 \
- $(DESTDIR)$(systemunitdir)/umount.target.wants
+ $(DESTDIR)$(systemunitdir)/umount.target.wants \
+ $(DESTDIR)$(systemunitdir)/sysinit.target.wants
( cd $(DESTDIR)$(systemunitdir)/umount.target.wants && \
rm -f umountfs.service umountnfs.service umountroot.service && \
$(LN_S) ../umountfs.service umountfs.service && \
@@ -975,6 +976,9 @@ if TARGET_DEBIAN
( cd $(DESTDIR)$(systemunitdir) && \
rm -f runlevel5.target && \
$(LN_S) multi-user.target runlevel5.target )
+ ( cd $(DESTDIR)$(systemunitdir)/sysinit.target.wants && \
+ rm -f fsck.target && \
+ $(LN_S) ../fsck.target fsck.target )
endif
if !TARGET_SUSE
if !TARGET_DEBIAN
diff --git a/units/debian/fsck.target b/units/debian/fsck.target
index 5da9a4f..b4aaf5c 100644
--- a/units/debian/fsck.target
+++ b/units/debian/fsck.target
@@ -9,3 +9,5 @@
[Unit]
Description=File System Check
+Wants=checkroot.service checkfs.service
+After=checkroot.service checkfs.service
--
1.7.1.765.gb5868
More information about the systemd-devel
mailing list