1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-06 08:26:52 +03:00
Commit Graph

3688 Commits

Author SHA1 Message Date
Michal Vyskocil
565d91fdf1 util: continuation support for load_env_file
Variable definitions can be written on more than one line - if each ends
with a backslash, then is concatenated with a previous one. Only
backslash and unix end of line (\n) are treated as a continuation.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=58083

[zj: squashed two patches together; cleaned up grammar; removed
     comment about ignoring trailing backslash -- it is not ignored.]

Document continuation support in systemd.exec
2013-01-18 11:06:15 -05:00
Zbigniew Jędrzejewski-Szmek
c3a7cfb7de journal-gatewayd,man: document new HTTPS options 2013-01-18 01:41:01 -05:00
Zbigniew Jędrzejewski-Szmek
a93035cee3 journal-gatewayd: return nice error on unsupported methods
Returns "HTTP/1.0 406 Not Acceptable" instead of silently
closing the connection.
2013-01-18 01:16:30 -05:00
Zbigniew Jędrzejewski-Szmek
8530a1436a journal-gatewayd: allow pipelining
The request must not be answered immediately (at first call to
response_handler()), but on the second. This is also important
for authentication, which cannot be performed on the first call.

Before:

% wget -O/dev/null -S https://localhost:19531/
--2012-11-28 18:29:43--  https://localhost:19531/
Resolving localhost (localhost)... 127.0.0.1
Connecting to localhost (localhost)|127.0.0.1|:19531... connected.
HTTP request sent, awaiting response...
  HTTP/1.1 301 Moved Permanently
  Connection: close
  Content-Length: 87
  Location: /browse
  Content-Type: text/html
  Date: Wed, 28 Nov 2012 17:29:44 GMT
Location: /browse [following]
--2012-11-28 18:29:43--  https://localhost:19531/browse
Connecting to localhost (localhost)|127.0.0.1|:19531... connected.
HTTP request sent, awaiting response...
  HTTP/1.1 200 OK
  Connection: close
  Content-Length: 23260
  Content-Type: text/html
  Date: Wed, 28 Nov 2012 17:29:44 GMT
Length: 23260 (23K) [text/html]

After:

% wget --no-check-certificate -O/dev/null -S https://localhost:19531/
--2012-11-28 18:30:05--  https://localhost:19531/
Resolving localhost (localhost)... 127.0.0.1
Connecting to localhost (localhost)|127.0.0.1|:19531... connected.
HTTP request sent, awaiting response...
  HTTP/1.1 301 Moved Permanently
  Content-Length: 87
  Location: /browse
  Content-Type: text/html
  Date: Wed, 28 Nov 2012 17:30:05 GMT
Location: /browse [following]
--2012-11-28 18:30:05--  https://localhost:19531/browse
Reusing existing connection to localhost:19531.
HTTP request sent, awaiting response...
  HTTP/1.1 200 OK
  Content-Length: 23260
  Content-Type: text/html
  Date: Wed, 28 Nov 2012 17:30:06 GMT
Length: 23260 (23K) [text/html]
2013-01-18 01:15:54 -05:00
Zbigniew Jędrzejewski-Szmek
9775033d26 journal-gatewayd: always log oom() in addition to returning error 2013-01-18 01:15:54 -05:00
Zbigniew Jędrzejewski-Szmek
e429981ba4 share/log: skip file/line/func info if empty
The new microhttpd logger doesn't know this information. It is
better to log nothing than fake values.
2013-01-18 01:15:54 -05:00
Zbigniew Jędrzejewski-Szmek
41a79f1062 share/log: unify two code paths
Explicit zeroing is replaced with initialization to {0}.

No functional change.
2013-01-18 01:15:54 -05:00
Zbigniew Jędrzejewski-Szmek
e64690a857 journal-gatewayd: redirect microhttpd messages to journal
A prefix ("microhttpd: ") is added to the log lines to make it easy to
distinguish the source.
2013-01-18 01:15:54 -05:00
Zbigniew Jędrzejewski-Szmek
858634ff0e journal-gatewayd: SSL support
For now the certificates are passed around as options to the
program. This might not be the most convenient under "production",
but makes for fairly easy testing.
2013-01-18 01:15:54 -05:00
Zbigniew Jędrzejewski-Szmek
c54ff8e358 journal-gatewayd: unify two code paths
In preparation for adding more options, split out the option
handling code.
2013-01-18 01:15:54 -05:00
Lennart Poettering
d2a3097582 systemctl: add new "get-cgroup-attr" to query current cgroup attribute value
Also adds a pair of bus calls for this to the daemon.
2013-01-18 01:44:41 +01:00
Lennart Poettering
d54110d11d systemctl: it's probably a good idea not to alter return parameters if we fail
We generally follow the rule not to touch return values unless we
succeed, so for the sake of uniformity do the same here.
2013-01-18 00:53:09 +01:00
Lennart Poettering
52a2ab41e0 systemctl: no need to check this explicitly, we already checked it a few lines up anyway, so let's just assert 2013-01-18 00:52:45 +01:00
Lennart Poettering
540e7dbe9e systemctl: we can make this faster and shorten it a bit with strv_extend()
Now that strv_extend() is not so slow anymore, we can make use of it, to
shorten our code a bit.
2013-01-18 00:51:48 +01:00
Lennart Poettering
82dde599ed strv: make strv_extend() smarter 2013-01-18 00:47:19 +01:00
Lennart Poettering
e31165b262 systemctl: make list-dependencies default to default.target 2013-01-18 00:36:12 +01:00
Lennart Poettering
e608b38a87 systemctl: we can use nulstr_contains() for this lookup
It's a bit easier to read...
2013-01-18 00:29:51 +01:00
Lukas Nykryn
55c0b89c57 systemctl add command list-dependencies
systemctl list-dependencies lists all unit's dependecies and
recursively expands all subsidiary target units into a tree.

Primary purpose for this command is to show all units which are
enabled in specified target.
2013-01-17 21:34:11 +01:00
Lennart Poettering
86ed7ec58b util: fix bad memory access 2013-01-17 17:38:13 +01:00
Nestor Ovroy
8755586eba core: corrects check of strduped controller string
In commit 246aa6d (core: add bus API and systemctl commands for altering
cgroup parameters during runtime), when rewriting unit_add_one_default_cgroup
to prefered style, the check of strduped b->controller was incorrectly
changed to check the containing structure. Correct it.
2013-01-17 09:31:50 -05:00
Lennart Poettering
464876c9c4 service: properly signal permanent failure of a service to its socket
This makes sure that a service is not indefinitely restarted in a tight
loop if it fails before it is able to process its socket.

This corrects the breakage introduced with
8d1b002a2e. Shame on me.
2013-01-17 04:54:34 +01:00
Kay Sievers
f4ddacbd4d udev: net_id - suppress bcma core == 0 2013-01-17 03:30:07 +01:00
Lennart Poettering
74051b9b58 units: for all unit settings that take lists, allow the empty string for resetting the lists
https://bugzilla.redhat.com/show_bug.cgi?id=756787
2013-01-17 02:50:05 +01:00
Lennart Poettering
4b20075e2f dbus: add Unit's PartOf and ConsistsOf deps to introspection XML 2013-01-17 02:50:05 +01:00
Kay Sievers
984c4348ff udev: net_id - handle "bcma" buses 2013-01-17 02:10:58 +01:00
Kay Sievers
59d86149b0 udev: path_id - clarify comment about the kernel ATA naming problem 2013-01-17 00:00:02 +01:00
Lennart Poettering
5d4caf5654 service: ignore dependencies on $syslog and $local_fs in LSB scripts
We no longer allow early-boot init scripts, however in late boot the
syslog socket and local mounts are established anyway, so let's simplify
our dep graph a bit.

If $syslog doesn't resolve to syslog.target anymore there's no reason to
keep syslog.target around anymore. Let's remove it.

Note that many 3rd party service unit files order themselves after
syslog.target. These will be dangling dependencies now, which should be
unproblematic, however.
2013-01-16 21:34:09 +01:00
Lukas Nykryn
9bdbc2e2ec systemctl,loginctl,cgls: do not ellipsize cgroup members when --full is specified
New file output.h with output flags and modes.

--full parameter also for cgls and loginctl.

Include 'all' parameter in flags (show_cgroup_by_path, show_cgroup,
show_cgroup_and_extra, show_cgroup_and_extra_by_spec).

get_process_cmdline with max_length == 0 will not ellipsize output.

Replace LINE_MAX with 0 in some calls of get_process_cmdline.

[zj: Default to --full when under pager for clgs.
     Drop '-f' since it wasn't documented and didn't actually work.
     Reindent a bit.
]
2013-01-16 12:11:47 -05:00
Zbigniew Jędrzejewski-Szmek
2e72983463 logs-show: automatic cleanup 2013-01-16 12:10:03 -05:00
Kay Sievers
bdffb521d0 shutdown: ignore loop devices without a backing file 2013-01-16 04:35:54 +01:00
Kay Sievers
3f141375cb service: sysv - remove distribution specific targets
Systemd should not introduce any new facilities. Distributions which still
need to support their non-standard/legacy facilities should add them as
patches to their packaging.

The following facilities are no longer recognized:
  $x-display-manager
  $mail-transfer-agent
  $mail-transport-agent
  $mail-transfer-agent
  $smtp
  $null

This target is no longer available:
  mail-transfer-agent.target
2013-01-16 04:26:49 +01:00
Lennart Poettering
0c08f5cde7 shutdown: in the final umount loop don't use MNT_FORCE
MNT_FORCE is honoured by NFS and FUSE and allows unmounting of the FS
even if consumers still use it. For our brute-force loop we rely on
EBUSY being reported as long as a file system is still used by a
loopback device or suchlike. Hence, drop MNT_FORCE to make EBUSY
reliable.
2013-01-16 04:03:57 +01:00
Dave Reisner
ec76596cab systemctl: fix assertion hit by incorrect comparison 2013-01-15 18:49:31 -05:00
Lennart Poettering
cd7409576d load-fragment: fix bad memory access 2013-01-15 21:45:37 +01:00
Lennart Poettering
858c33bf60 load-fragment: replace specifiers in path unit's Unit= setting 2013-01-15 21:37:17 +01:00
Michał Bartoszkiewicz
7d0c710d72 core: do not make sockets dependent on lo
/sys/subsystem/net/devices/lo is never considered active, so sockets
with BindToDevice=lo would never be activated.
2013-01-15 21:00:11 +01:00
David Herrmann
244692cbfb journalctl: quit on I/O error
This makes journalctl quit on ferror() conditions on stdout. It fixes an
annoying bug if you pipe its output through 'less' and press 'q'. Without
this fix journalctl will continue reading all journal data until EOF which
can take quite some time. For instance on my machine:

    david-nb ~ # time journalctl | wc -l
    327240

    real    1m13.039s
    user    1m0.217s
    sys     0m10.467s

However, expected behavior is journalctl to quit when its pager closed the
output pipe.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
2013-01-15 20:59:10 +01:00
Michal Sekletar
0762eaa327 logind: remove unused variable 2013-01-15 20:50:33 +01:00
Michal Sekletar
38c888a404 core: use correct argument of type JobResult 2013-01-15 20:50:33 +01:00
Kay Sievers
10ffbc99af vconsole: use /dev/vcsa1-15 to check for allocated VTs 2013-01-15 20:40:53 +01:00
Kay Sievers
d3b37e8469 vconsole: copy font to tty1-15 2013-01-15 16:32:32 +01:00
Oleksii Shevchuk
69bd386c4c Typo fix 2013-01-15 06:08:32 -05:00
Lennart Poettering
59164be40e systemctl: when inhibiting shutdown/suspend also check for other login sessions 2013-01-15 03:04:41 +01:00
Lennart Poettering
c84f5e4a82 login: introduce sd_session_get_tty() 2013-01-15 03:01:35 +01:00
Kay Sievers
dd04aac97f vconsole: upload font to /dev/tty1 and copy it to all allocated VTs 2013-01-15 02:25:56 +01:00
Lennart Poettering
1ca04b8797 logind: ignore non-tty/non-x11 session when checking if there are other sessions before shutting down
https://bugzilla.redhat.com/show_bug.cgi?id=890827
2013-01-14 21:41:41 +01:00
Lennart Poettering
aca26b5220 systemctl: drop compat with really really old systemd versions 2013-01-14 21:25:25 +01:00
Lennart Poettering
1dcf60656c systemctl: be smarter when mangling snapshot names
For "systemctl snapshot" it makes no sense to complete an incomplete
name with ".service" as we previously did, use ".snapshot" instead.
Also, don't bother with mount units or suchlike, we know that this must
be a snapshot and hence is the only sane way for completion.
2013-01-14 21:24:58 +01:00
Lennart Poettering
f84190d8ca systemctl: numerous modernizations 2013-01-14 21:24:58 +01:00
Lennart Poettering
043c432b77 bootchart: no need for memset here 2013-01-14 21:24:57 +01:00