chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
62347bc
)
drop support for MANAGER_SESSION, introduce MANAGER_USER instead
author
Lennart Poettering
<lennart@poettering.net>
Mon, 15 Nov 2010 21:12:41 +0000
(22:12 +0100)
committer
Lennart Poettering
<lennart@poettering.net>
Mon, 15 Nov 2010 21:13:26 +0000
(22:13 +0100)
26 files changed:
Makefile.am
patch
|
blob
|
history
TODO
patch
|
blob
|
history
man/daemon.xml
patch
|
blob
|
history
man/systemadm.xml
patch
|
blob
|
history
man/systemctl.xml
patch
|
blob
|
history
man/systemd.conf.xml
patch
|
blob
|
history
man/systemd.special.xml.in
patch
|
blob
|
history
man/systemd.xml
patch
|
blob
|
history
src/dbus-manager.c
patch
|
blob
|
history
src/dbus.c
patch
|
blob
|
history
src/main.c
patch
|
blob
|
history
src/manager.c
patch
|
blob
|
history
src/manager.h
patch
|
blob
|
history
src/path-lookup.c
patch
|
blob
|
history
src/path-lookup.h
patch
|
blob
|
history
src/sd-daemon.h
patch
|
blob
|
history
src/service.c
patch
|
blob
|
history
src/systemadm.vala
patch
|
blob
|
history
src/systemctl-bash-completion.sh
patch
|
blob
|
history
src/systemctl.c
patch
|
blob
|
history
systemd.pc.in
patch
|
blob
|
history
units/user/.gitignore
[moved from
units/session/.gitignore
with 100% similarity]
patch
|
blob
|
history
units/user/Makefile
[moved from
units/session/Makefile
with 100% similarity]
patch
|
blob
|
history
units/user/default.target
[moved from
units/session/default.target
with 100% similarity]
patch
|
blob
|
history
units/user/exit.service.in
[moved from
units/session/exit.service.in
with 90% similarity]
patch
|
blob
|
history
units/user/exit.target
[moved from
units/session/exit.target
with 100% similarity]
patch
|
blob
|
history
diff --git
a/Makefile.am
b/Makefile.am
index 3389f436dfc73ac12e551b542bb8befb9e7ff188..8cc25306f5e49ec16c7556a36f577bb5591a1539 100644
(file)
--- a/
Makefile.am
+++ b/
Makefile.am
@@
-30,9
+30,9
@@
bashcompletiondir=$(sysconfdir)/bash_completion.d
# Our own, non-special dirs
pkgsysconfdir=$(sysconfdir)/systemd
# Our own, non-special dirs
pkgsysconfdir=$(sysconfdir)/systemd
-sessionunitdir=$(pkgdatadir)/session
+userunitdir=$(pkgdatadir)/user
tmpfilesdir=$(sysconfdir)/tmpfiles.d
tmpfilesdir=$(sysconfdir)/tmpfiles.d
-
sessiongeneratordir=$(pkglibexecdir)/session
-generators
+
usergeneratordir=$(pkglibexecdir)/user
-generators
# And these are the special ones for /
rootdir=@rootdir@
# And these are the special ones for /
rootdir=@rootdir@
@@
-49,9
+49,9
@@
AM_CPPFLAGS = \
-DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \
-DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\" \
-DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" \
-DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" \
-DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\" \
-DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" \
- -D
SESSION_CONFIG_FILE=\"$(pkgsysconfdir)/session
.conf\" \
- -D
SESSION_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/session
\" \
- -D
SESSION_DATA_UNIT_PATH=\"$(session
unitdir)\" \
+ -D
USER_CONFIG_FILE=\"$(pkgsysconfdir)/user
.conf\" \
+ -D
USER_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/user
\" \
+ -D
USER_DATA_UNIT_PATH=\"$(user
unitdir)\" \
-DSYSTEMD_CGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \
-DSYSTEMD_BINARY_PATH=\"$(rootbindir)/systemd\" \
-DSYSTEMD_SHUTDOWN_BINARY_PATH=\"$(rootlibexecdir)/systemd-shutdown\" \
-DSYSTEMD_CGROUP_AGENT_PATH=\"$(rootlibexecdir)/systemd-cgroups-agent\" \
-DSYSTEMD_BINARY_PATH=\"$(rootbindir)/systemd\" \
-DSYSTEMD_SHUTDOWN_BINARY_PATH=\"$(rootlibexecdir)/systemd-shutdown\" \
@@
-61,7
+61,7
@@
AM_CPPFLAGS = \
-DRANDOM_SEED=\"$(localstatedir)/lib/random-seed\" \
-DSYSTEMD_CRYPTSETUP_PATH=\"$(rootlibexecdir)/systemd-cryptsetup\" \
-DSYSTEM_GENERATOR_PATH=\"$(systemgeneratordir)\" \
-DRANDOM_SEED=\"$(localstatedir)/lib/random-seed\" \
-DSYSTEMD_CRYPTSETUP_PATH=\"$(rootlibexecdir)/systemd-cryptsetup\" \
-DSYSTEM_GENERATOR_PATH=\"$(systemgeneratordir)\" \
- -D
SESSION_GENERATOR_PATH=\"$(session
generatordir)\" \
+ -D
USER_GENERATOR_PATH=\"$(user
generatordir)\" \
-I $(top_srcdir)/src
if TARGET_GENTOO
-I $(top_srcdir)/src
if TARGET_GENTOO
@@
-268,13
+268,13
@@
nodist_systemunit_DATA = \
units/quotacheck.service \
units/rescue.service
units/quotacheck.service \
units/rescue.service
-dist_
session
unit_DATA = \
- units/
session
/default.target \
- units/
session
/exit.target
+dist_
user
unit_DATA = \
+ units/
user
/default.target \
+ units/
user
/exit.target
-nodist_
session
unit_DATA = \
- units/
session
/remote-fs.target \
- units/
session
/exit.service
+nodist_
user
unit_DATA = \
+ units/
user
/remote-fs.target \
+ units/
user
/exit.service
EXTRA_DIST = \
units/getty@.service.m4 \
EXTRA_DIST = \
units/getty@.service.m4 \
@@
-307,7
+307,7
@@
EXTRA_DIST = \
units/poweroff.service.in \
units/reboot.service.in \
units/kexec.service.in \
units/poweroff.service.in \
units/reboot.service.in \
units/kexec.service.in \
- units/
session
/exit.service.in \
+ units/
user
/exit.service.in \
units/fsck@.service.in \
units/fsck-root.service.in \
units/quotacheck.service.in \
units/fsck@.service.in \
units/fsck-root.service.in \
units/quotacheck.service.in \
@@
-1008,19
+1008,19
@@
M4_PROCESS_SYSTEM = \
$(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
$(M4) -P $(M4_DISTRO_FLAG) -DFOR_SYSTEM=1 < $< > $@ || rm $@
$(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
$(M4) -P $(M4_DISTRO_FLAG) -DFOR_SYSTEM=1 < $< > $@ || rm $@
-M4_PROCESS_
SESSION
= \
+M4_PROCESS_
USER
= \
$(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
$(AM_V_GEN)$(MKDIR_P) $(dir $@) && \
- $(M4) -P $(M4_DISTRO_FLAG) -DFOR_
SESSION
=1 < $< > $@ || rm $@
+ $(M4) -P $(M4_DISTRO_FLAG) -DFOR_
USER
=1 < $< > $@ || rm $@
units/%: units/%.m4 Makefile
$(M4_PROCESS_SYSTEM)
units/%: units/%.m4 Makefile
$(M4_PROCESS_SYSTEM)
-units/
session
/%: units/%.m4 Makefile
- $(M4_PROCESS_
SESSION
)
+units/
user
/%: units/%.m4 Makefile
+ $(M4_PROCESS_
USER
)
CLEANFILES = \
$(nodist_systemunit_DATA) \
CLEANFILES = \
$(nodist_systemunit_DATA) \
- $(nodist_
session
unit_DATA) \
+ $(nodist_
user
unit_DATA) \
$(nodist_man_MANS) \
${XML_IN_FILES:.xml.in=.html} \
$(pkgconfigdata_DATA)
$(nodist_man_MANS) \
${XML_IN_FILES:.xml.in=.html} \
$(pkgconfigdata_DATA)
@@
-1105,7
+1105,7
@@
CLEANFILES += \
install-data-hook:
$(MKDIR_P) -m 0755 \
$(DESTDIR)$(systemunitdir) \
install-data-hook:
$(MKDIR_P) -m 0755 \
$(DESTDIR)$(systemunitdir) \
- $(DESTDIR)$(
session
unitdir) \
+ $(DESTDIR)$(
user
unitdir) \
$(DESTDIR)$(systemunitdir)/sysinit.target.wants \
$(DESTDIR)$(systemunitdir)/sockets.target.wants \
$(DESTDIR)$(systemunitdir)/basic.target.wants \
$(DESTDIR)$(systemunitdir)/sysinit.target.wants \
$(DESTDIR)$(systemunitdir)/sockets.target.wants \
$(DESTDIR)$(systemunitdir)/basic.target.wants \
@@
-1123,11
+1123,11
@@
install-data-hook:
$(DESTDIR)$(pkgsysconfdir)/system/local-fs.target.wants \
$(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants \
$(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants \
$(DESTDIR)$(pkgsysconfdir)/system/local-fs.target.wants \
$(DESTDIR)$(pkgsysconfdir)/system/multi-user.target.wants \
$(DESTDIR)$(pkgsysconfdir)/system/getty.target.wants \
- $(DESTDIR)$(pkgsysconfdir)/
session
\
+ $(DESTDIR)$(pkgsysconfdir)/
user
\
$(DESTDIR)$(sysconfdir)/xdg/systemd
( cd $(DESTDIR)$(sysconfdir)/xdg/systemd/ && \
$(DESTDIR)$(sysconfdir)/xdg/systemd
( cd $(DESTDIR)$(sysconfdir)/xdg/systemd/ && \
- rm -f
session
&& \
- $(LN_S) $(pkgsysconfdir)/
session session
)
+ rm -f
user
&& \
+ $(LN_S) $(pkgsysconfdir)/
user user
)
( cd $(DESTDIR)$(systemunitdir)/sockets.target.wants && \
rm -f systemd-initctl.socket systemd-logger.socket systemd-shutdownd.socket syslog.socket && \
$(LN_S) ../systemd-logger.socket systemd-logger.socket && \
( cd $(DESTDIR)$(systemunitdir)/sockets.target.wants && \
rm -f systemd-initctl.socket systemd-logger.socket systemd-shutdownd.socket syslog.socket && \
$(LN_S) ../systemd-logger.socket systemd-logger.socket && \
@@
-1167,7
+1167,7
@@
install-data-hook:
$(LN_S) ../remount-rootfs.service remount-rootfs.service && \
$(LN_S) ../var-run.mount var-run.mount && \
$(LN_S) ../var-lock.mount var-lock.mount )
$(LN_S) ../remount-rootfs.service remount-rootfs.service && \
$(LN_S) ../var-run.mount var-run.mount && \
$(LN_S) ../var-lock.mount var-lock.mount )
- ( cd $(DESTDIR)$(
session
unitdir) && \
+ ( cd $(DESTDIR)$(
user
unitdir) && \
rm -f shutdown.target sockets.target local-fs.target swap.target bluetooth.target printer.target && \
$(LN_S) $(systemunitdir)/shutdown.target shutdown.target && \
$(LN_S) $(systemunitdir)/sockets.target sockets.target && \
rm -f shutdown.target sockets.target local-fs.target swap.target bluetooth.target printer.target && \
$(LN_S) $(systemunitdir)/shutdown.target shutdown.target && \
$(LN_S) $(systemunitdir)/sockets.target sockets.target && \
diff --git
a/TODO
b/TODO
index 29b70115a80f7c9dc45d316d7fe9d506d710b67a..945f8d998ce62010cf0d84e349e464d78f70a8c6 100644
(file)
--- a/
TODO
+++ b/
TODO
@@
-42,8
+42,6
@@
* add systemctl switch to dump transaction without executing it
* add systemctl switch to dump transaction without executing it
-* system.conf/session.conf man page
-
* suspend, resume
* systemctl auto-pager a la git
* suspend, resume
* systemctl auto-pager a la git
@@
-79,8
+77,6
@@
* declare /etc/os-release cross-distro standard
* declare /etc/os-release cross-distro standard
-* rename s/session/user/g
-
* fix hotplug transactions
External:
* fix hotplug transactions
External:
diff --git
a/man/daemon.xml
b/man/daemon.xml
index 42a7ffd8bb1d02f8193e27a7f26da25d7ad462b2..f592e7d6e26531538b57ae6b8562affae5c6be91 100644
(file)
--- a/
man/daemon.xml
+++ b/
man/daemon.xml
@@
-760,8
+760,8
@@
--variable=systemdsystemunitdir</command> (for
system services), resp. <command>pkg-config
systemd
--variable=systemdsystemunitdir</command> (for
system services), resp. <command>pkg-config
systemd
- --variable=systemd
session
unitdir</command>
- (for
session
services). This will make the
+ --variable=systemd
user
unitdir</command>
+ (for
user
services). This will make the
services available in the system on explicit
request but not activate them automatically
during boot. Optionally, during package
services available in the system on explicit
request but not activate them automatically
during boot. Optionally, during package
@@
-795,7
+795,7
@@
AM_CONDITIONAL(HAVE_SYSTEMD, [test -n "$with_systemdsystemunitdir" -a "x$with_sy
machines, and optionally allows their
installation even on machines lacking
systemd. (Modification of this snippet for the
machines, and optionally allows their
installation even on machines lacking
systemd. (Modification of this snippet for the
-
session
unit directory is left as excercise to the
+
user
unit directory is left as excercise to the
reader.)</para>
<para>Additionally, to ensure that
reader.)</para>
<para>Additionally, to ensure that
diff --git
a/man/systemadm.xml
b/man/systemadm.xml
index 1377b18c2cc131641dd92b38abb847b37679de0e..cefc3009816c931dca02f6b28b6b2f6875248d7e 100644
(file)
--- a/
man/systemadm.xml
+++ b/
man/systemadm.xml
@@
-45,7
+45,7
@@
<refnamediv>
<refname>systemadm</refname>
<refpurpose>Graphical frontend for the systemd system
<refnamediv>
<refname>systemadm</refname>
<refpurpose>Graphical frontend for the systemd system
- and se
ssion
manager</refpurpose>
+ and se
rvice
manager</refpurpose>
</refnamediv>
<refsynopsisdiv>
</refnamediv>
<refsynopsisdiv>
@@
-58,7
+58,7
@@
<title>Description</title>
<para><command>systemadm</command> is a graphical
<title>Description</title>
<para><command>systemadm</command> is a graphical
- frontend for the systemd system and se
ssion
manager
+ frontend for the systemd system and se
rvice
manager
and allows introspection and control of
systemd.</para>
</refsect1>
and allows introspection and control of
systemd.</para>
</refsect1>
@@
-87,10
+87,10
@@
</varlistentry>
<varlistentry>
</varlistentry>
<varlistentry>
- <term><option>--
session
</option></term>
+ <term><option>--
user
</option></term>
<listitem><para>Connect to the systemd
<listitem><para>Connect to the systemd
-
session
manager of the calling
+ manager of the calling
user.</para></listitem>
</varlistentry>
user.</para></listitem>
</varlistentry>
diff --git
a/man/systemctl.xml
b/man/systemctl.xml
index 10e0f82441368eb8460b260e7692fbbb96963bd5..844d218877ad37c6aea5313d221436ce4b1c364b 100644
(file)
--- a/
man/systemctl.xml
+++ b/
man/systemctl.xml
@@
-44,7
+44,7
@@
<refnamediv>
<refname>systemctl</refname>
<refnamediv>
<refname>systemctl</refname>
- <refpurpose>Control the systemd system and se
ssion
manager</refpurpose>
+ <refpurpose>Control the systemd system and se
rvice
manager</refpurpose>
</refnamediv>
<refsynopsisdiv>
</refnamediv>
<refsynopsisdiv>
@@
-59,7
+59,7
@@
<para><command>systemctl</command> may be used to
introspect and control the state of the
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
<para><command>systemctl</command> may be used to
introspect and control the state of the
<citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>
- system and se
ssion
manager.</para>
+ system and se
rvice
manager.</para>
</refsect1>
<refsect1>
</refsect1>
<refsect1>
@@
-178,10
+178,10
@@
</varlistentry>
<varlistentry>
</varlistentry>
<varlistentry>
- <term><option>--
session
</option></term>
+ <term><option>--
user
</option></term>
<listitem><para>Talk to the systemd
<listitem><para>Talk to the systemd
-
session
manager of the calling user.</para></listitem>
+ manager of the calling user.</para></listitem>
</varlistentry>
<varlistentry>
</varlistentry>
<varlistentry>
@@
-224,10
+224,10
@@
<listitem><para>When used with
<command>enable</command> and
<command>disable</command>, operate on the
<listitem><para>When used with
<command>enable</command> and
<command>disable</command>, operate on the
- global
session
configuŕation
+ global
user
configuŕation
directory, thus enabling or disabling
a unit file globally for all future
directory, thus enabling or disabling
a unit file globally for all future
-
sessio
ns of all users.</para></listitem>
+
logi
ns of all users.</para></listitem>
</varlistentry>
<varlistentry>
</varlistentry>
<varlistentry>
@@
-598,11
+598,11
@@
<para>Depending on whether
<option>--system</option>,
<para>Depending on whether
<option>--system</option>,
- <option>--
session
</option> or
+ <option>--
user
</option> or
<option>--global</option> is specified
this enables the unit for the system,
<option>--global</option> is specified
this enables the unit for the system,
- for
sessions of
the calling user only
- or for all future
session
of all
+ for the calling user only
+ or for all future
logins
of all
users. Note that in the latter case no
systemd daemon configuration is
reloaded.</para>
users. Note that in the latter case no
systemd daemon configuration is
reloaded.</para>
@@
-643,7
+643,7
@@
<para>This command honours
<option>--system</option>,
<para>This command honours
<option>--system</option>,
- <option>--
session
</option>,
+ <option>--
user
</option>,
<option>--global</option> in a similar
way as
<command>enable</command>.</para>
<option>--global</option> in a similar
way as
<command>enable</command>.</para>
@@
-942,9
+942,9
@@
<listitem><para>Ask the systemd
manager to quit. This is only
<listitem><para>Ask the systemd
manager to quit. This is only
- supported for
session
managers
+ supported for
user service
managers
(i.e. in conjunction with the
(i.e. in conjunction with the
- <option>--
session
</option> option) and
+ <option>--
user
</option> option) and
will fail otherwise.</para></listitem>
</varlistentry>
</variablelist>
will fail otherwise.</para></listitem>
</varlistentry>
</variablelist>
diff --git
a/man/systemd.conf.xml
b/man/systemd.conf.xml
index 399cae0a6c5c67e6a34285da51aa452b0db629de..6759f978148b5f3f6a8a837aa4dff08ed1ad7cfa 100644
(file)
--- a/
man/systemd.conf.xml
+++ b/
man/systemd.conf.xml
@@
-49,7
+49,7
@@
<refsynopsisdiv>
<para><filename>system.conf</filename></para>
<refsynopsisdiv>
<para><filename>system.conf</filename></para>
- <para><filename>
session
.conf</filename></para>
+ <para><filename>
user
.conf</filename></para>
</refsynopsisdiv>
<refsect1>
</refsynopsisdiv>
<refsect1>
@@
-57,7
+57,7
@@
<para>When run as system instance systemd reads the
configuration file <filename>system.conf</filename>,
<para>When run as system instance systemd reads the
configuration file <filename>system.conf</filename>,
- otherwise <filename>
session
.conf</filename>. These
+ otherwise <filename>
user
.conf</filename>. These
configuration files contain a few settings controlling
basic manager operations.</para>
configuration files contain a few settings controlling
basic manager operations.</para>
@@
-79,6
+79,7
@@
<term><varname>DumpCore=yes</varname></term>
<term><varname>CrashShell=no</varname></term>
<term><varname>ShowStatus=yes</varname></term>
<term><varname>DumpCore=yes</varname></term>
<term><varname>CrashShell=no</varname></term>
<term><varname>ShowStatus=yes</varname></term>
+ <term><varname>SysVConsole=yes</varname></term>
<term><varname>CrashChVT=1</varname></term>
<listitem><para>Configures various
<term><varname>CrashChVT=1</varname></term>
<listitem><para>Configures various
@@
-99,6
+100,18
@@
process. Takes a space-separated list
of CPU indexes.</para></listitem>
</varlistentry>
process. Takes a space-separated list
of CPU indexes.</para></listitem>
</varlistentry>
+
+ <varlistentry>
+ <term><varname>MountAuto=yes</varname></term>
+ <term><varname>SwapAuto=yes</varname></term>
+
+ <listitem><para>Configures whether
+ systemd should automatically activate
+ all swap or mounts listed in
+ <filename>/etc/fstab</filename>, or
+ whether this job is left to some other
+ system script.</para></listitem>
+ </varlistentry>
</variablelist>
</refsect1>
</variablelist>
</refsect1>
diff --git
a/man/systemd.special.xml.in
b/man/systemd.special.xml.in
index 2855f6a25f807d2c2353a8d119172d79fa683372..afe882e51f231638b21eb5074ca374cb40a84b31 100644
(file)
--- a/
man/systemd.special.xml.in
+++ b/
man/systemd.special.xml.in
@@
-698,9
+698,9
@@
</refsect1>
<refsect1>
</refsect1>
<refsect1>
- <title>Special
Session
Units</title>
+ <title>Special
User
Units</title>
- <para>When systemd runs as a
service
instance, the
+ <para>When systemd runs as a
user
instance, the
following special units are available, which have
similar definitions as their system counterparts:
<filename>default.target</filename>,
following special units are available, which have
similar definitions as their system counterparts:
<filename>default.target</filename>,
@@
-719,22
+719,22
@@
<listitem>
<para>A special service unit
for shutting down the
<listitem>
<para>A special service unit
for shutting down the
-
session
.</para>
+
user service manager
.</para>
<para>Applications wanting to
<para>Applications wanting to
- terminate the
session should
- start this unit. If systemd
- receives SIGTERM or SIGINT
- when running as session daemon
- it will start this
- unit.</para>
+ terminate the
user service
+ manager should start this
+ unit. If systemd receives
+ SIGTERM or SIGINT when running
+ as user service daemon it will
+
start this
unit.</para>
<para>Normally, this pulls in
<filename>shutdown.target</filename>
which in turn should be
conflicted by all units that
want to be shut down on
<para>Normally, this pulls in
<filename>shutdown.target</filename>
which in turn should be
conflicted by all units that
want to be shut down on
-
session
exit.</para>
+
user service manager
exit.</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
</variablelist>
diff --git
a/man/systemd.xml
b/man/systemd.xml
index f434bfcc580bcebc2e33ded102d5a364c8d265c9..c6c06e57e9fd1ebcc5938ecd2e8eae2199196a53 100644
(file)
--- a/
man/systemd.xml
+++ b/
man/systemd.xml
@@
-45,7
+45,7
@@
<refnamediv>
<refname>systemd</refname>
<refname>init</refname>
<refnamediv>
<refname>systemd</refname>
<refname>init</refname>
- <refpurpose>systemd System and Se
ssion
Manager</refpurpose>
+ <refpurpose>systemd System and Se
rvice
Manager</refpurpose>
</refnamediv>
<refsynopsisdiv>
</refnamediv>
<refsynopsisdiv>
@@
-60,7
+60,7
@@
<refsect1>
<title>Description</title>
<refsect1>
<title>Description</title>
- <para>systemd is a system and se
ssion
manager for
+ <para>systemd is a system and se
rvice
manager for
Linux operating systems. When run as first process on
boot (as PID 1), it acts as init system that brings
up and maintains userspace services.</para>
Linux operating systems. When run as first process on
boot (as PID 1), it acts as init system that brings
up and maintains userspace services.</para>
@@
-77,7
+77,7
@@
<para>When run as system instance, systemd interprets
the configuration file
<filename>system.conf</filename>, otherwise
<para>When run as system instance, systemd interprets
the configuration file
<filename>system.conf</filename>, otherwise
- <filename>
session
.conf</filename>. See
+ <filename>
user
.conf</filename>. See
<citerefentry><refentrytitle>systemd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
for more information.</para>
</refsect1>
<citerefentry><refentrytitle>systemd.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
for more information.</para>
</refsect1>
@@
-136,10
+136,10
@@
</varlistentry>
<varlistentry>
<term><option>--system</option></term>
</varlistentry>
<varlistentry>
<term><option>--system</option></term>
- <term><option>--
session
</option></term>
+ <term><option>--
user
</option></term>
<listitem><para>Tell systemd to run a
<listitem><para>Tell systemd to run a
- system instance (resp.
session
+ system instance (resp.
user
instance), even if the process ID is
not 1 (resp. is 1), i.e. systemd is
not (resp. is) run as init process.
instance), even if the process ID is
not 1 (resp. is 1), i.e. systemd is
not (resp. is) run as init process.
@@
-159,27
+159,36
@@
<varlistentry>
<term><option>--dump-core</option></term>
<varlistentry>
<term><option>--dump-core</option></term>
- <listitem><para>Dump core on crash. This switch has no effect when run as session instance.</para></listitem>
+ <listitem><para>Dump core on
+ crash. This switch has no effect when
+ run as user
+ instance.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--crash-shell</option></term>
</varlistentry>
<varlistentry>
<term><option>--crash-shell</option></term>
- <listitem><para>Run shell on crash. This switch has no effect when run as session instance.</para></listitem>
+ <listitem><para>Run shell on
+ crash. This switch has no effect when
+ run as user
+ instance.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--confirm-spawn</option></term>
</varlistentry>
<varlistentry>
<term><option>--confirm-spawn</option></term>
- <listitem><para>Ask for confirmation when spawning processes. This switch has no effect when run as session instance.</para></listitem>
+ <listitem><para>Ask for confirmation
+ when spawning processes. This switch
+ has no effect when run as user
+ instance.</para></listitem>
</varlistentry>
<varlistentry>
<term><option>--show-status=</option></term>
<listitem><para>Show terse service
status information while booting. This
</varlistentry>
<varlistentry>
<term><option>--show-status=</option></term>
<listitem><para>Show terse service
status information while booting. This
- switch has no effect when run as
- session instance. Takes a boolean
- argument which may be omitted
-
which is
interpreted as
+ switch has no effect when run as
user
+ instance. Takes a boolean argument
+ which may be omitted which is
+ interpreted as
<option>true</option>.</para></listitem>
</varlistentry>
<varlistentry>
<option>true</option>.</para></listitem>
</varlistentry>
<varlistentry>
@@
-188,7
+197,7
@@
<listitem><para>Controls whether
output of SysV init scripts will be
directed to the console. This switch
<listitem><para>Controls whether
output of SysV init scripts will be
directed to the console. This switch
- has no effect when run as
session
+ has no effect when run as
user
instance. Takes a boolean argument
which may be omitted which is
interpreted as
instance. Takes a boolean argument
which may be omitted which is
interpreted as
@@
-489,10
+498,10
@@
<variablelist>
<varlistentry>
<variablelist>
<varlistentry>
- <term>
Session
unit directories</term>
+ <term>
User
unit directories</term>
<listitem><para>Similar rules apply
<listitem><para>Similar rules apply
- for the
session
unit
+ for the
user
unit
directories. However, here the <ulink
url="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG
Base Directory specification</ulink>
directories. However, here the <ulink
url="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG
Base Directory specification</ulink>
@@
-500,11
+509,11
@@
units. Applications should place their
unit files in the directory returned
by <command>pkg-config systemd
units. Applications should place their
unit files in the directory returned
by <command>pkg-config systemd
- --variable=systemd
session
unitdir</command>. Global
+ --variable=systemd
user
unitdir</command>. Global
configuration is done in the directory
reported by <command>pkg-config
systemd
configuration is done in the directory
reported by <command>pkg-config
systemd
- --variable=systemd
session
confdir</command>. The
+ --variable=systemd
user
confdir</command>. The
<command>enable</command> and
<command>disable</command> commands of
the
<command>enable</command> and
<command>disable</command> commands of
the
@@
-565,12
+574,12
@@
to <command>systemctl
daemon-reexec</command>.</para>
to <command>systemctl
daemon-reexec</command>.</para>
- <para>systemd
session
managers will
+ <para>systemd
user
managers will
start the
<filename>exit.target</filename> unit
when this signal is received. This is
mostly equivalent to
start the
<filename>exit.target</filename> unit
when this signal is received. This is
mostly equivalent to
- <command>systemctl --
session
start
+ <command>systemctl --
user
start
exit.target</command>.</para></listitem>
</varlistentry>
exit.target</command>.</para></listitem>
</varlistentry>
@@
-585,7
+594,7
@@
<command>systemctl start
ctl-alt-del.target</command>.</para>
<command>systemctl start
ctl-alt-del.target</command>.</para>
- <para>systemd
session
managers
+ <para>systemd
user
managers
treat this signal the same way as
SIGTERM.</para></listitem>
</varlistentry>
treat this signal the same way as
SIGTERM.</para></listitem>
</varlistentry>
@@
-602,7
+611,7
@@
kbrequest.target</command>.</para>
<para>This signal is ignored by
kbrequest.target</command>.</para>
<para>This signal is ignored by
- systemd
session
+ systemd
user
managers.</para></listitem>
</varlistentry>
managers.</para></listitem>
</varlistentry>
@@
-757,7
+766,7
@@
<term><varname>$XDG_DATA_HOME</varname></term>
<term><varname>$XDG_DATA_DIRS</varname></term>
<term><varname>$XDG_DATA_HOME</varname></term>
<term><varname>$XDG_DATA_DIRS</varname></term>
- <listitem><para>The systemd
session
+ <listitem><para>The systemd
user
manager uses these variables in
accordance to the <ulink
url="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG
manager uses these variables in
accordance to the <ulink
url="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG
diff --git
a/src/dbus-manager.c
b/src/dbus-manager.c
index 769035f607e6865d634436c35973578a70017f45..d1d3b4784e7fa33484d01d925b711c3f6857078a 100644
(file)
--- a/
src/dbus-manager.c
+++ b/
src/dbus-manager.c
@@
-854,7
+854,7
@@
static DBusHandlerResult bus_manager_message_handler(DBusConnection *connection,
} else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "Exit")) {
if (m->running_as == MANAGER_SYSTEM) {
} else if (dbus_message_is_method_call(message, "org.freedesktop.systemd1.Manager", "Exit")) {
if (m->running_as == MANAGER_SYSTEM) {
- dbus_set_error(&error, BUS_ERROR_NOT_SUPPORTED, "Exit is only supported for
session
managers.");
+ dbus_set_error(&error, BUS_ERROR_NOT_SUPPORTED, "Exit is only supported for
user service
managers.");
return bus_send_error_reply(m, connection, message, &error, -ENOTSUP);
}
return bus_send_error_reply(m, connection, message, &error, -ENOTSUP);
}
diff --git
a/src/dbus.c
b/src/dbus.c
index 4365bca7bf6de7253587046ddb46348c2662a600..66076f021cb1c98fdf77551faed7216f57e04d09 100644
(file)
--- a/
src/dbus.c
+++ b/
src/dbus.c
@@
-864,7
+864,7
@@
static int bus_init_api(Manager *m) {
if (m->running_as == MANAGER_SYSTEM && m->system_bus)
m->api_bus = m->system_bus;
else {
if (m->running_as == MANAGER_SYSTEM && m->system_bus)
m->api_bus = m->system_bus;
else {
- if (!(m->api_bus = dbus_bus_get_private(m->running_as == MANAGER_
SESSION
? DBUS_BUS_SESSION : DBUS_BUS_SYSTEM, &error))) {
+ if (!(m->api_bus = dbus_bus_get_private(m->running_as == MANAGER_
USER
? DBUS_BUS_SESSION : DBUS_BUS_SYSTEM, &error))) {
log_debug("Failed to get API D-Bus connection, retrying later: %s", error.message);
r = 0;
goto fail;
log_debug("Failed to get API D-Bus connection, retrying later: %s", error.message);
r = 0;
goto fail;
diff --git
a/src/main.c
b/src/main.c
index 71e684b1bda9f34cb5889c41bc30ff7a683ea3eb..4bdc6763fabf83546407b784ecb9b51c4c4654d7 100644
(file)
--- a/
src/main.c
+++ b/
src/main.c
@@
-514,7
+514,7
@@
static int parse_config_file(void) {
const char *fn;
int r;
const char *fn;
int r;
- fn = arg_running_as == MANAGER_SYSTEM ? SYSTEM_CONFIG_FILE :
SESSION
_CONFIG_FILE;
+ fn = arg_running_as == MANAGER_SYSTEM ? SYSTEM_CONFIG_FILE :
USER
_CONFIG_FILE;
if (!(f = fopen(fn, "re"))) {
if (errno == ENOENT)
if (!(f = fopen(fn, "re"))) {
if (errno == ENOENT)
@@
-573,7
+573,7
@@
static int parse_argv(int argc, char *argv[]) {
ARG_LOG_LOCATION,
ARG_UNIT,
ARG_SYSTEM,
ARG_LOG_LOCATION,
ARG_UNIT,
ARG_SYSTEM,
- ARG_
SESSION
,
+ ARG_
USER
,
ARG_TEST,
ARG_DUMP_CONFIGURATION_ITEMS,
ARG_DUMP_CORE,
ARG_TEST,
ARG_DUMP_CONFIGURATION_ITEMS,
ARG_DUMP_CORE,
@@
-592,7
+592,7
@@
static int parse_argv(int argc, char *argv[]) {
{ "log-location", optional_argument, NULL, ARG_LOG_LOCATION },
{ "unit", required_argument, NULL, ARG_UNIT },
{ "system", no_argument, NULL, ARG_SYSTEM },
{ "log-location", optional_argument, NULL, ARG_LOG_LOCATION },
{ "unit", required_argument, NULL, ARG_UNIT },
{ "system", no_argument, NULL, ARG_SYSTEM },
- { "
session", no_argument, NULL, ARG_SESSION
},
+ { "
user", no_argument, NULL, ARG_USER
},
{ "test", no_argument, NULL, ARG_TEST },
{ "help", no_argument, NULL, 'h' },
{ "dump-configuration-items", no_argument, NULL, ARG_DUMP_CONFIGURATION_ITEMS },
{ "test", no_argument, NULL, ARG_TEST },
{ "help", no_argument, NULL, 'h' },
{ "dump-configuration-items", no_argument, NULL, ARG_DUMP_CONFIGURATION_ITEMS },
@@
-671,8
+671,8
@@
static int parse_argv(int argc, char *argv[]) {
arg_running_as = MANAGER_SYSTEM;
break;
arg_running_as = MANAGER_SYSTEM;
break;
- case ARG_
SESSION
:
- arg_running_as = MANAGER_
SESSION
;
+ case ARG_
USER
:
+ arg_running_as = MANAGER_
USER
;
break;
case ARG_TEST:
break;
case ARG_TEST:
@@
-794,14
+794,14
@@
static int parse_argv(int argc, char *argv[]) {
static int help(void) {
printf("%s [OPTIONS...]\n\n"
static int help(void) {
printf("%s [OPTIONS...]\n\n"
- "Starts up and maintains the system or
a session
.\n\n"
+ "Starts up and maintains the system or
user services
.\n\n"
" -h --help Show this help\n"
" --test Determine startup sequence, dump it and exit\n"
" --dump-configuration-items Dump understood unit configuration items\n"
" --introspect[=INTERFACE] Extract D-Bus interface data\n"
" --unit=UNIT Set default unit\n"
" --system Run a system instance, even if PID != 1\n"
" -h --help Show this help\n"
" --test Determine startup sequence, dump it and exit\n"
" --dump-configuration-items Dump understood unit configuration items\n"
" --introspect[=INTERFACE] Extract D-Bus interface data\n"
" --unit=UNIT Set default unit\n"
" --system Run a system instance, even if PID != 1\n"
- " --
session Run a session
instance\n"
+ " --
user Run a user
instance\n"
" --dump-core Dump core on crash\n"
" --crash-shell Run shell on crash\n"
" --confirm-spawn Ask for confirmation when spawning processes\n"
" --dump-core Dump core on crash\n"
" --crash-shell Run shell on crash\n"
" --confirm-spawn Ask for confirmation when spawning processes\n"
@@
-951,7
+951,7
@@
int main(int argc, char *argv[]) {
if (label_init() < 0)
goto finish;
} else {
if (label_init() < 0)
goto finish;
} else {
- arg_running_as = MANAGER_
SESSION
;
+ arg_running_as = MANAGER_
USER
;
log_set_target(LOG_TARGET_CONSOLE);
}
log_set_target(LOG_TARGET_CONSOLE);
}
@@
-1235,7
+1235,7
@@
finish:
if (arg_running_as == MANAGER_SYSTEM)
args[i++] = "--system";
else
if (arg_running_as == MANAGER_SYSTEM)
args[i++] = "--system";
else
- args[i++] = "--
session
";
+ args[i++] = "--
user
";
if (arg_dump_core)
args[i++] = "--dump-core";
if (arg_dump_core)
args[i++] = "--dump-core";
diff --git
a/src/manager.c
b/src/manager.c
index 204a88e791717535bfc4793c23011c0677a8b0d8..25d85eaf110727f2d790a85a447e0eb92533979f 100644
(file)
--- a/
src/manager.c
+++ b/
src/manager.c
@@
-2015,7
+2015,7
@@
static int manager_start_target(Manager *m, const char *name, JobMode mode) {
dbus_error_init(&error);
dbus_error_init(&error);
- log_
info
("Activating special unit %s", name);
+ log_
debug
("Activating special unit %s", name);
if ((r = manager_add_job_by_name(m, JOB_START, name, mode, true, &error, NULL)) < 0)
log_error("Failed to enqueue %s job: %s", name, bus_error(&error, r));
if ((r = manager_add_job_by_name(m, JOB_START, name, mode, true, &error, NULL)) < 0)
log_error("Failed to enqueue %s job: %s", name, bus_error(&error, r));
@@
-2839,7
+2839,7
@@
void manager_run_generators(Manager *m) {
assert(m);
assert(m);
- generator_path = m->running_as == MANAGER_SYSTEM ? SYSTEM_GENERATOR_PATH :
SESSION
_GENERATOR_PATH;
+ generator_path = m->running_as == MANAGER_SYSTEM ? SYSTEM_GENERATOR_PATH :
USER
_GENERATOR_PATH;
if (!(d = opendir(generator_path))) {
if (errno == ENOENT)
if (!(d = opendir(generator_path))) {
if (errno == ENOENT)
@@
-2852,9
+2852,9
@@
void manager_run_generators(Manager *m) {
if (!m->generator_unit_path) {
char *p;
char system_path[] = "/dev/.systemd/generator-XXXXXX",
if (!m->generator_unit_path) {
char *p;
char system_path[] = "/dev/.systemd/generator-XXXXXX",
-
session
_path[] = "/tmp/systemd-generator-XXXXXX";
+
user
_path[] = "/tmp/systemd-generator-XXXXXX";
- if (!(p = mkdtemp(m->running_as == MANAGER_SYSTEM ? system_path :
session
_path))) {
+ if (!(p = mkdtemp(m->running_as == MANAGER_SYSTEM ? system_path :
user
_path))) {
log_error("Failed to generate generator directory: %m");
goto finish;
}
log_error("Failed to generate generator directory: %m");
goto finish;
}
@@
-2990,7
+2990,7
@@
void manager_undo_generators(Manager *m) {
static const char* const manager_running_as_table[_MANAGER_RUNNING_AS_MAX] = {
[MANAGER_SYSTEM] = "system",
static const char* const manager_running_as_table[_MANAGER_RUNNING_AS_MAX] = {
[MANAGER_SYSTEM] = "system",
- [MANAGER_
SESSION] = "session
"
+ [MANAGER_
USER] = "user
"
};
DEFINE_STRING_TABLE_LOOKUP(manager_running_as, ManagerRunningAs);
};
DEFINE_STRING_TABLE_LOOKUP(manager_running_as, ManagerRunningAs);
diff --git
a/src/manager.h
b/src/manager.h
index e61194ad41cc2cd0411aed0c5c4b4044d9fcfc22..c7ace2dd5ebd8f483f1de0c85b349ef7cfc79320 100644
(file)
--- a/
src/manager.h
+++ b/
src/manager.h
@@
-51,7
+51,7
@@
typedef enum ManagerExitCode {
typedef enum ManagerRunningAs {
MANAGER_SYSTEM,
typedef enum ManagerRunningAs {
MANAGER_SYSTEM,
- MANAGER_
SESSION
,
+ MANAGER_
USER
,
_MANAGER_RUNNING_AS_MAX,
_MANAGER_RUNNING_AS_INVALID = -1
} ManagerRunningAs;
_MANAGER_RUNNING_AS_MAX,
_MANAGER_RUNNING_AS_INVALID = -1
} ManagerRunningAs;
diff --git
a/src/path-lookup.c
b/src/path-lookup.c
index c746e5e1ad5895076921a396b836fbc4e4c8cc0a..f094969adaf9c1a2224b66443a904edae9defa3b 100644
(file)
--- a/
src/path-lookup.c
+++ b/
src/path-lookup.c
@@
-30,11
+30,11
@@
#include "path-lookup.h"
#include "path-lookup.h"
-int
session
_config_home(char **config_home) {
+int
user
_config_home(char **config_home) {
const char *e;
if ((e = getenv("XDG_CONFIG_HOME"))) {
const char *e;
if ((e = getenv("XDG_CONFIG_HOME"))) {
- if (asprintf(config_home, "%s/systemd/
session
", e) < 0)
+ if (asprintf(config_home, "%s/systemd/
user
", e) < 0)
return -ENOMEM;
return 1;
return -ENOMEM;
return 1;
@@
-42,7
+42,7
@@
int session_config_home(char **config_home) {
const char *home;
if ((home = getenv("HOME"))) {
const char *home;
if ((home = getenv("HOME"))) {
- if (asprintf(config_home, "%s/.config/systemd/
session
", home) < 0)
+ if (asprintf(config_home, "%s/.config/systemd/
user
", home) < 0)
return -ENOMEM;
return 1;
return -ENOMEM;
return 1;
@@
-52,7
+52,7
@@
int session_config_home(char **config_home) {
return 0;
}
return 0;
}
-static char**
session
_dirs(void) {
+static char**
user
_dirs(void) {
const char *home, *e;
char *config_home = NULL, *data_home = NULL;
char **config_dirs = NULL, **data_dirs = NULL;
const char *home, *e;
char *config_home = NULL, *data_home = NULL;
char **config_dirs = NULL, **data_dirs = NULL;
@@
-67,7
+67,7
@@
static char** session_dirs(void) {
* as data, and allow overriding as configuration.
*/
* as data, and allow overriding as configuration.
*/
- if (
session
_config_home(&config_home) < 0)
+ if (
user
_config_home(&config_home) < 0)
goto fail;
home = getenv("HOME");
goto fail;
home = getenv("HOME");
@@
-81,11
+81,11
@@
static char** session_dirs(void) {
* /etc/systemd/ anyway. */
if ((e = getenv("XDG_DATA_HOME"))) {
* /etc/systemd/ anyway. */
if ((e = getenv("XDG_DATA_HOME"))) {
- if (asprintf(&data_home, "%s/systemd/
session
", e) < 0)
+ if (asprintf(&data_home, "%s/systemd/
user
", e) < 0)
goto fail;
} else if (home) {
goto fail;
} else if (home) {
- if (asprintf(&data_home, "%s/.local/share/systemd/
session
", home) < 0)
+ if (asprintf(&data_home, "%s/.local/share/systemd/
user
", home) < 0)
goto fail;
/* There is really no need for two unit dirs in $HOME,
goto fail;
/* There is really no need for two unit dirs in $HOME,
@@
-96,7
+96,7
@@
static char** session_dirs(void) {
* one. */
mkdir_parents(data_home, 0777);
* one. */
mkdir_parents(data_home, 0777);
- (void) symlink("../../../.config/systemd/
session
", data_home);
+ (void) symlink("../../../.config/systemd/
user
", data_home);
}
if ((e = getenv("XDG_DATA_DIRS")))
}
if ((e = getenv("XDG_DATA_DIRS")))
@@
-115,12
+115,12
@@
static char** session_dirs(void) {
r = t;
}
r = t;
}
- if (!(t = strv_merge_concat(r, config_dirs, "/systemd/
session
")))
+ if (!(t = strv_merge_concat(r, config_dirs, "/systemd/
user
")))
goto finish;
strv_free(r);
r = t;
goto finish;
strv_free(r);
r = t;
- if (!(t = strv_append(r,
SESSION
_CONFIG_UNIT_PATH)))
+ if (!(t = strv_append(r,
USER
_CONFIG_UNIT_PATH)))
goto fail;
strv_free(r);
r = t;
goto fail;
strv_free(r);
r = t;
@@
-132,12
+132,12
@@
static char** session_dirs(void) {
r = t;
}
r = t;
}
- if (!(t = strv_merge_concat(r, data_dirs, "/systemd/
session
")))
+ if (!(t = strv_merge_concat(r, data_dirs, "/systemd/
user
")))
goto fail;
strv_free(r);
r = t;
goto fail;
strv_free(r);
r = t;
- if (!(t = strv_append(r,
SESSION
_DATA_UNIT_PATH)))
+ if (!(t = strv_append(r,
USER
_DATA_UNIT_PATH)))
goto fail;
strv_free(r);
r = t;
goto fail;
strv_free(r);
r = t;
@@
-176,8
+176,8
@@
int lookup_paths_init(LookupPaths *p, ManagerRunningAs running_as) {
/* Nothing is set, so let's figure something out. */
strv_free(p->unit_path);
/* Nothing is set, so let's figure something out. */
strv_free(p->unit_path);
- if (running_as == MANAGER_
SESSION
) {
- if (!(p->unit_path =
session
_dirs()))
+ if (running_as == MANAGER_
USER
) {
+ if (!(p->unit_path =
user
_dirs()))
return -ENOMEM;
} else
if (!(p->unit_path = strv_new(
return -ENOMEM;
} else
if (!(p->unit_path = strv_new(
diff --git
a/src/path-lookup.h
b/src/path-lookup.h
index dca8b55e15b2a30219c53900df2b699be4232a2f..e06f9793d27c9841a5693404d0bac4decb26c954 100644
(file)
--- a/
src/path-lookup.h
+++ b/
src/path-lookup.h
@@
-32,7
+32,7
@@
typedef struct LookupPaths {
#include "manager.h"
#include "manager.h"
-int
session
_config_home(char **config_home);
+int
user
_config_home(char **config_home);
int lookup_paths_init(LookupPaths *p, ManagerRunningAs running_as);
void lookup_paths_free(LookupPaths *p);
int lookup_paths_init(LookupPaths *p, ManagerRunningAs running_as);
void lookup_paths_free(LookupPaths *p);
diff --git
a/src/sd-daemon.h
b/src/sd-daemon.h
index fdf3cc03548cce17bd94bb5811dd00edccbd761e..d0a0a9459a44ee2364210e32ab2aa09487c31b0a 100644
(file)
--- a/
src/sd-daemon.h
+++ b/
src/sd-daemon.h
@@
-252,7
+252,7
@@
int sd_notifyf(int unset_environment, const char *format, ...) _sd_printf_attr_(
fine. You should NOT protect them with a call to this function. Also
note that this function checks whether the system, not the user
session is controlled by systemd. However the functions above work
fine. You should NOT protect them with a call to this function. Also
note that this function checks whether the system, not the user
session is controlled by systemd. However the functions above work
- for both
session
and system services.
+ for both
user
and system services.
See sd_booted(3) for more information.
*/
See sd_booted(3) for more information.
*/
diff --git
a/src/service.c
b/src/service.c
index 0b54e5bfcfb760d6e09ccaa430faae0488573f57..184ddf91437f8d4a1e70845e5ff3dca7ce43cc09 100644
(file)
--- a/
src/service.c
+++ b/
src/service.c
@@
-1014,7
+1014,7
@@
static int service_add_default_dependencies(Service *s) {
if ((r = unit_add_two_dependencies_by_name(UNIT(s), UNIT_AFTER, UNIT_REQUIRES, SPECIAL_BASIC_TARGET, NULL, true)) < 0)
return r;
if ((r = unit_add_two_dependencies_by_name(UNIT(s), UNIT_AFTER, UNIT_REQUIRES, SPECIAL_BASIC_TARGET, NULL, true)) < 0)
return r;
- } else if (s->meta.manager->running_as == MANAGER_
SESSION
) {
+ } else if (s->meta.manager->running_as == MANAGER_
USER
) {
if ((r = unit_add_two_dependencies_by_name(UNIT(s), UNIT_AFTER, UNIT_REQUIRES, SPECIAL_SOCKETS_TARGET, NULL, true)) < 0)
return r;
if ((r = unit_add_two_dependencies_by_name(UNIT(s), UNIT_AFTER, UNIT_REQUIRES, SPECIAL_SOCKETS_TARGET, NULL, true)) < 0)
return r;
diff --git
a/src/systemadm.vala
b/src/systemadm.vala
index 2f3aed205af7d0876a1af5e95f012e2b9b5ce84e..3a01efd3c386c0f7ebb5e7f5fddee45db5214639 100644
(file)
--- a/
src/systemadm.vala
+++ b/
src/systemadm.vala
@@
-22,7
+22,7
@@
using GLib;
using DBus;
using Pango;
using DBus;
using Pango;
-static bool
session
= false;
+static bool
user
= false;
public class LeftLabel : Label {
public LeftLabel(string? text = null) {
public class LeftLabel : Label {
public LeftLabel(string? text = null) {
@@
-103,7
+103,7
@@
public class MainWindow : Window {
private ComboBox unit_type_combo_box;
public MainWindow() throws DBus.Error {
private ComboBox unit_type_combo_box;
public MainWindow() throws DBus.Error {
- title =
session ? "systemd Session
Manager" : "systemd System Manager";
+ title =
user ? "systemd User Service
Manager" : "systemd System Manager";
position = WindowPosition.CENTER;
set_default_size(1000, 700);
set_border_width(12);
position = WindowPosition.CENTER;
set_default_size(1000, 700);
set_border_width(12);
@@
-297,7
+297,7
@@
public class MainWindow : Window {
bbox.pack_start(cancel_button, false, true, 0);
bbox.pack_start(cancel_button, false, true, 0);
- bus = DBus.Bus.get(
session
? DBus.BusType.SESSION : DBus.BusType.SYSTEM);
+ bus = DBus.Bus.get(
user
? DBus.BusType.SESSION : DBus.BusType.SYSTEM);
manager = bus.get_object(
"org.freedesktop.systemd1",
manager = bus.get_object(
"org.freedesktop.systemd1",
@@
-967,8
+967,8
@@
public class MainWindow : Window {
}
static const OptionEntry entries[] = {
}
static const OptionEntry entries[] = {
- { "
session", 0, 0, OptionArg.NONE, out session, "Connect to session bus
", null },
- { "system", 0, OptionFlags.REVERSE, OptionArg.NONE,
out session, "Connect to system bus",
null },
+ { "
user", 0, 0, OptionArg.NONE, out user, "Connect to user service manager
", null },
+ { "system", 0, OptionFlags.REVERSE, OptionArg.NONE,
out user, "Connect to system manager",
null },
{ null }
};
{ null }
};
diff --git
a/src/systemctl-bash-completion.sh
b/src/systemctl-bash-completion.sh
index 53f8e52aaae3362b9c280cf9eb10382da6cff898..3e3380c8e0e5a3f795e9f6ae42ad1425c2464fae 100644
(file)
--- a/
src/systemctl-bash-completion.sh
+++ b/
src/systemctl-bash-completion.sh
@@
-44,7
+44,7
@@
_systemctl () {
local -A OPTS=(
[STANDALONE]='--all -a --defaults --fail --force -f --full --global
--help -h --no-ask-password --no-block --no-reload --no-wall
local -A OPTS=(
[STANDALONE]='--all -a --defaults --fail --force -f --full --global
--help -h --no-ask-password --no-block --no-reload --no-wall
- --order --require --quiet -q --s
ession --system
--version'
+ --order --require --quiet -q --s
ystem --user
--version'
[ARG]='--kill-mode --kill-who --property -p --signal -s --type -t'
)
[ARG]='--kill-mode --kill-who --property -p --signal -s --type -t'
)
diff --git
a/src/systemctl.c
b/src/systemctl.c
index 372b3d0ca662adeeaba24d5cbc4b541bf4c89f43..9d6e012309800dee721fa90781e31673cf2b671f 100644
(file)
--- a/
src/systemctl.c
+++ b/
src/systemctl.c
@@
-61,7
+61,7
@@
static const char *arg_type = NULL;
static char **arg_property = NULL;
static bool arg_all = false;
static bool arg_fail = false;
static char **arg_property = NULL;
static bool arg_all = false;
static bool arg_fail = false;
-static bool arg_
session
= false;
+static bool arg_
user
= false;
static bool arg_global = false;
static bool arg_immediate = false;
static bool arg_no_block = false;
static bool arg_global = false;
static bool arg_immediate = false;
static bool arg_no_block = false;
@@
-1234,7
+1234,7
@@
static int start_unit_one(
if (need_daemon_reload(bus, name))
log_warning("Unit file of created job changed on disk, 'systemctl %s daemon-reload' recommended.",
if (need_daemon_reload(bus, name))
log_warning("Unit file of created job changed on disk, 'systemctl %s daemon-reload' recommended.",
- arg_
session ? "--session
" : "--system");
+ arg_
user ? "--user
" : "--system");
if (!arg_no_block) {
char *p;
if (!arg_no_block) {
char *p;
@@
-1937,7
+1937,7
@@
static void print_status_info(UnitStatusInfo *i) {
printf("\n%sWarning:%s Unit file changed on disk, 'systemctl %s daemon-reload' recommended.\n",
ansi_highlight(true),
ansi_highlight(false),
printf("\n%sWarning:%s Unit file changed on disk, 'systemctl %s daemon-reload' recommended.\n",
ansi_highlight(true),
ansi_highlight(false),
- arg_
session ? "--session
" : "--system");
+ arg_
user ? "--user
" : "--system");
}
static int status_property(const char *name, DBusMessageIter *iter, UnitStatusInfo *i) {
}
static int status_property(const char *name, DBusMessageIter *iter, UnitStatusInfo *i) {
@@
-3919,13
+3919,13
@@
static int install_info_apply(const char *verb, LookupPaths *paths, InstallInfo
static char *get_config_path(void) {
static char *get_config_path(void) {
- if (arg_
session
&& arg_global)
- return strdup(
SESSION
_CONFIG_UNIT_PATH);
+ if (arg_
user
&& arg_global)
+ return strdup(
USER
_CONFIG_UNIT_PATH);
- if (arg_
session
) {
+ if (arg_
user
) {
char *p;
char *p;
- if (
session
_config_home(&p) < 0)
+ if (
user
_config_home(&p) < 0)
return NULL;
return p;
return NULL;
return p;
@@
-3946,7
+3946,7
@@
static int enable_unit(DBusConnection *bus, char **args, unsigned n) {
dbus_error_init(&error);
zero(paths);
dbus_error_init(&error);
zero(paths);
- if ((r = lookup_paths_init(&paths, arg_
session ? MANAGER_SESSION
: MANAGER_SYSTEM)) < 0) {
+ if ((r = lookup_paths_init(&paths, arg_
user ? MANAGER_USER
: MANAGER_SYSTEM)) < 0) {
log_error("Failed to determine lookup paths: %s", strerror(-r));
goto finish;
}
log_error("Failed to determine lookup paths: %s", strerror(-r));
goto finish;
}
@@
-4010,9
+4010,9
@@
static int enable_unit(DBusConnection *bus, char **args, unsigned n) {
/* Don't try to reload anything when updating a unit globally */
!arg_global &&
/* Don't try to reload anything if we are called for system changes but the system wasn't booted with systemd */
/* Don't try to reload anything when updating a unit globally */
!arg_global &&
/* Don't try to reload anything if we are called for system changes but the system wasn't booted with systemd */
- (arg_
session
|| sd_booted() > 0) &&
+ (arg_
user
|| sd_booted() > 0) &&
/* Don't try to reload anything if we are running in a chroot environment */
/* Don't try to reload anything if we are running in a chroot environment */
- (arg_
session
|| running_in_chroot() <= 0) ) {
+ (arg_
user
|| running_in_chroot() <= 0) ) {
int q;
if ((q = daemon_reload(bus, args, n)) < 0)
int q;
if ((q = daemon_reload(bus, args, n)) < 0)
@@
-4047,8
+4047,8
@@
static int systemctl_help(void) {
" pending\n"
" -q --quiet Suppress output\n"
" --no-block Do not wait until operation finished\n"
" pending\n"
" -q --quiet Suppress output\n"
" --no-block Do not wait until operation finished\n"
- " --system Connect to system
bus
\n"
- " --
session Connect to session bus
\n"
+ " --system Connect to system
manager
\n"
+ " --
user Connect to user service manager
\n"
" --order When generating graph for dot, show only order\n"
" --require When generating graph for dot, show only requirement\n"
" --no-wall Don't send wall message before halt/power-off/reboot\n"
" --order When generating graph for dot, show only order\n"
" --require When generating graph for dot, show only requirement\n"
" --no-wall Don't send wall message before halt/power-off/reboot\n"
@@
-4105,7
+4105,7
@@
static int systemctl_help(void) {
" poweroff Shut down and power-off the system\n"
" reboot Shut down and reboot the system\n"
" kexec Shut down and reboot the system with kexec\n"
" poweroff Shut down and power-off the system\n"
" reboot Shut down and reboot the system\n"
" kexec Shut down and reboot the system with kexec\n"
- " exit Ask for
session
termination\n",
+ " exit Ask for
user instance
termination\n",
program_invocation_short_name);
return 0;
program_invocation_short_name);
return 0;
@@
-4182,7
+4182,7
@@
static int systemctl_parse_argv(int argc, char *argv[]) {
enum {
ARG_FAIL = 0x100,
ARG_VERSION,
enum {
ARG_FAIL = 0x100,
ARG_VERSION,
- ARG_
SESSION
,
+ ARG_
USER
,
ARG_SYSTEM,
ARG_GLOBAL,
ARG_NO_BLOCK,
ARG_SYSTEM,
ARG_GLOBAL,
ARG_NO_BLOCK,
@@
-4205,7
+4205,7
@@
static int systemctl_parse_argv(int argc, char *argv[]) {
{ "all", no_argument, NULL, 'a' },
{ "full", no_argument, NULL, ARG_FULL },
{ "fail", no_argument, NULL, ARG_FAIL },
{ "all", no_argument, NULL, 'a' },
{ "full", no_argument, NULL, ARG_FULL },
{ "fail", no_argument, NULL, ARG_FAIL },
- { "
session", no_argument, NULL, ARG_SESSION
},
+ { "
user", no_argument, NULL, ARG_USER
},
{ "system", no_argument, NULL, ARG_SYSTEM },
{ "global", no_argument, NULL, ARG_GLOBAL },
{ "no-block", no_argument, NULL, ARG_NO_BLOCK },
{ "system", no_argument, NULL, ARG_SYSTEM },
{ "global", no_argument, NULL, ARG_GLOBAL },
{ "no-block", no_argument, NULL, ARG_NO_BLOCK },
@@
-4273,12
+4273,12
@@
static int systemctl_parse_argv(int argc, char *argv[]) {
arg_fail = true;
break;
arg_fail = true;
break;
- case ARG_
SESSION
:
- arg_
session
= true;
+ case ARG_
USER
:
+ arg_
user
= true;
break;
case ARG_SYSTEM:
break;
case ARG_SYSTEM:
- arg_
session
= false;
+ arg_
user
= false;
break;
case ARG_NO_BLOCK:
break;
case ARG_NO_BLOCK:
@@
-4315,7
+4315,7
@@
static int systemctl_parse_argv(int argc, char *argv[]) {
case ARG_GLOBAL:
arg_global = true;
case ARG_GLOBAL:
arg_global = true;
- arg_
session
= true;
+ arg_
user
= true;
break;
case ARG_DEFAULTS:
break;
case ARG_DEFAULTS:
@@
-5236,7
+5236,7
@@
int main(int argc, char*argv[]) {
goto finish;
}
goto finish;
}
- bus_connect(arg_
session
? DBUS_BUS_SESSION : DBUS_BUS_SYSTEM, &bus, &private_bus, &error);
+ bus_connect(arg_
user
? DBUS_BUS_SESSION : DBUS_BUS_SYSTEM, &bus, &private_bus, &error);
switch (arg_action) {
switch (arg_action) {
diff --git
a/systemd.pc.in
b/systemd.pc.in
index 71a5678f8d8bae772fd2ce6895534894a0902bce..b5230f6bf9b255567657f6d0da317ad6d22c251c 100644
(file)
--- a/
systemd.pc.in
+++ b/
systemd.pc.in
@@
-13,6
+13,6
@@
systemdsystemconfdir=@pkgsysconfdir@/system
systemdsessionconfdir=@pkgsysconfdir@/session
Name: systemd
systemdsessionconfdir=@pkgsysconfdir@/session
Name: systemd
-Description: systemd System and Se
ssion
Manager
+Description: systemd System and Se
rvice
Manager
URL: @PACKAGE_URL@
Version: @PACKAGE_VERSION@
URL: @PACKAGE_URL@
Version: @PACKAGE_VERSION@
diff --git
a/units/session/.gitignore
b/units/user/.gitignore
similarity index 100%
rename from
units/session/.gitignore
rename to
units/user/.gitignore
diff --git
a/units/session/Makefile
b/units/user/Makefile
similarity index 100%
rename from
units/session/Makefile
rename to
units/user/Makefile
diff --git
a/units/session/default.target
b/units/user/default.target
similarity index 100%
rename from
units/session/default.target
rename to
units/user/default.target
diff --git
a/units/session/exit.service.in
b/units/user/exit.service.in
similarity index 90%
rename from
units/session/exit.service.in
rename to
units/user/exit.service.in
index 024fbe172d236d93661dcfdbdd2943953470017e..a20b089c9a5af44ce15aed52f511030538c6a15b 100644
(file)
--- a/
units/session/exit.service.in
+++ b/
units/user/exit.service.in
@@
-15,4
+15,4
@@
After=shutdown.target
[Service]
Type=oneshot
[Service]
Type=oneshot
-ExecStart=@SYSTEMCTL@ --
session
--force exit
+ExecStart=@SYSTEMCTL@ --
user
--force exit
diff --git
a/units/session/exit.target
b/units/user/exit.target
similarity index 100%
rename from
units/session/exit.target
rename to
units/user/exit.target