]> err.no Git - systemd/commitdiff
unit: properly generate session units
authorLennart Poettering <lennart@poettering.net>
Mon, 17 May 2010 00:17:22 +0000 (02:17 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 17 May 2010 00:17:22 +0000 (02:17 +0200)
Makefile.am
units/.gitignore
units/remote-fs.target.m4 [moved from units/remote-fs.target with 89% similarity]
units/session/Makefile [new symlink]

index 683a00bc0c02f30162db1dbe058743e2ea4a6920..3b54699afd1d46c4975951745ea7c66d5f401841 100644 (file)
@@ -93,6 +93,9 @@ systemunit_DATA = \
        units/systemd-logger.service \
        units/syslog.target
 
+sessionunit_DATA = \
+       units/session/remote-fs.target
+
 EXTRA_DIST = \
        units/basic.target.m4 \
        units/getty@.service.m4 \
@@ -322,21 +325,31 @@ if TARGET_FEDORA
 M4_FLAGS += -DTARGET_FEDORA=1
 endif
 
-M4_PROCESS = \
+M4_PROCESS_SYSTEM = \
        $(MKDIR_P) units && \
-       $(M4) -P $(M4_FLAGS) < $< > $@
+       $(M4) -P $(M4_FLAGS) -DFOR_SYSTEM < $< > $@
+
+M4_PROCESS_SESSION = \
+       $(MKDIR_P) units/session && \
+       $(M4) -P $(M4_FLAGS) -DFOR_SESSION < $< > $@
 
 units/basic.target: units/basic.target.m4 Makefile
-       $(M4_PROCESS)
+       $(M4_PROCESS_SYSTEM)
 
 units/graphical.target: units/graphical.target.m4 Makefile
-       $(M4_PROCESS)
+       $(M4_PROCESS_SYSTEM)
 
 units/multi-user.target: units/multi-user.target.m4 Makefile
-       $(M4_PROCESS)
+       $(M4_PROCESS_SYSTEM)
 
 units/getty@.service: units/getty@.service.m4 Makefile
-       $(M4_PROCESS)
+       $(M4_PROCESS_SYSTEM)
+
+units/remote-fs.target: units/remote-fs.target.m4 Makefile
+       $(M4_PROCESS_SYSTEM)
+
+units/session/remote-fs.target: units/remote-fs.target.m4 Makefile
+       $(M4_PROCESS_SESSION)
 
 CLEANFILES = \
        src/systemd-interfaces.c \
@@ -384,9 +397,11 @@ install-data-hook:
                $(LN_S) ../systemd-logger.socket systemd-logger.socket && \
                $(LN_S) ../systemd-initctl.socket systemd-initctl.socket )
        ( cd $(DESTDIR)$(sessionunitdir) && \
-               rm -f shutdown.target sockets.target && \
+               rm -f shutdown.target sockets.target local-fs.target swap.target && \
                $(LN_S) ../system/shutdown.target shutdown.target && \
-               $(LN_S) ../system/sockets.target sockets.target )
+               $(LN_S) ../system/sockets.target sockets.target && \
+               $(LN_S) ../system/local-fs.target local-fs.target && \
+               $(LN_S) ../system/swap.target swap.target )
        ( cd $(DESTDIR)$(systemunitdir) && \
                rm -f runlevel0.target runlevel1.target runlevel6.target && \
                $(LN_S) poweroff.target runlevel0.target && \
index 21b3b384c775816f8dbedabe1ac2dd84094b926d..7e61543864a1edbbd3a5b08511296ddce63b88af 100644 (file)
@@ -5,3 +5,4 @@ basic.target
 graphical.target
 multi-user.target
 getty@.service
+remote-fs.target
similarity index 89%
rename from units/remote-fs.target
rename to units/remote-fs.target.m4
index 177a773c90026061cc96aa664f439c85a12601d1..0891d0b025733cc085606df2c98332fda1db4490 100644 (file)
@@ -19,5 +19,9 @@
 
 [Unit]
 Description=Remote File Systems
+m4_dnl
+m4_ifdef(`FOR_SYSTEM',
+m4_dnl When running in system mode we need the network up
 Requires=network.target
 After=network.target
+)m4_dnl
diff --git a/units/session/Makefile b/units/session/Makefile
new file mode 120000 (symlink)
index 0000000..50be211
--- /dev/null
@@ -0,0 +1 @@
+../../src/Makefile
\ No newline at end of file