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

12022 Commits

Author SHA1 Message Date
William Giokas
862f4963c6 zsh_completion: Fix single letter args
Things like -n to specify the lines to show with systemctl and
journalctl accepts syntax like:

  journalctl -n4
  systemctl -n14

Previously, typing `-nXX <tab>` where XX is a number, zsh would try to
complete an integer. Now it will see the XX and use the _journalctl_none
completion. This is also how any of the single letter options that take
arguments work as well.
2013-08-23 12:48:14 -04:00
Maciej Wereski
ea92ae33e0 "-" prefix for InaccessibleDirectories and ReadOnlyDirectories 2013-08-23 12:48:14 -04:00
Shawn Landden
ac8e20c6e9 man: make reference to bind(2) explicit 2013-08-23 12:48:14 -04:00
Shawn Landden
7c902b1468 udev: fix printf(3) type specifier
src/udev/udev-rules.c: In function 'add_rule':
src/udev/udev-rules.c:1078:33: warning: format '%lu' expects argument of type 'long unsigned int', but argument 8 has type 'int' [-Wformat=]
                                 log_error("invalid key/value pair in file %s on line %u,"
                                 ^
2013-08-23 12:48:14 -04:00
Gao feng
f236910365 blkio: fix incorrect setting of cpu_shares
We should set up blockio_weight not cpu_shares.
2013-08-23 12:48:14 -04:00
Zbigniew Jędrzejewski-Szmek
d182614649 nspawn: trivial simplification 2013-08-23 12:48:14 -04:00
Harald Hoyer
1f11a0cdfe cgroup.c: check return value of unit_realize_cgroup_now()
do not recurse further, if unit_realize_cgroup_now() failed
2013-08-23 18:46:51 +02:00
Colin Walters
73814ca287 Revert "udevd: simplify sigterm check"
This reverts commit 47e737dc13 - it
introduced a use-after-free.  The only way the code would get simpler
is with a cleanup function, but eh, not worth it for just this one
bit.

Reviewed by kay on IRC.
2013-08-22 17:07:02 -04:00
Kay Sievers
df89481a35 Optimize startswith() to macro
I guess it's easier and cleaner anyway to use simple static inline
functions instead of defines.
2013-08-22 00:52:14 -04:00
Shawn Landden
2a0e069256 remove hasprefix(), use startswith() 2013-08-22 00:52:14 -04:00
Khem Raj
67c15b9a7a use CAP_MKNOD ConditionCapability
Fixes errors seen when booting VMs on QEMU like

systemd[1]: kmod-static-nodes.service: main process exited, code=exited, status=203/EXEC
systemd[1]: Failed to start Create list of required static device nodes for the current kernel.
systemd[1]: Unit kmod-static-nodes.service entered failed state.

Make sure that mknod capability is available

Signed-off-by: Khem Raj <raj.khem@gmail.com>
2013-08-22 00:52:14 -04:00
Zbigniew Jędrzejewski-Szmek
d83c224da0 man: typo
ohsix> ooh theres a typo in the example
2013-08-22 00:52:14 -04:00
Holger Hans Peter Freyther
143bfdaf0b test: Make testing work on systems without or old systemd
* Introduce a macro to conditionally execute tests. This avoids
  skipping the entire test if some parts require systemd
* Skip the journal tests when no /etc/machine-id is present
* Change test-catalog to load the catalog from the source directory
  of systemd.
* /proc/PID/comm got introduced in v2.6.33 but travis is still
  using v2.6.32.
* Enable make check and make distcheck on the travis build
* Use -D"CATALOG_DIR=STR($(abs_top_srcdir)/catalog)" as a STRINGIY
  would result in the path '/home/ich/source/linux' to be expanded
  to '/home/ich/source/1' as linux is defined to 1.
2013-08-22 00:52:14 -04:00
Kay Sievers
67ccd1c4b8 remove freenode verification file 2013-08-21 14:11:43 +02:00
Kay Sievers
0611ef5cc1 add freenode verification 2013-08-21 13:10:40 +02:00
Zbigniew Jędrzejewski-Szmek
2526d62691 logs-show: fix condition for ellipsizing multi-line messages
falconindy> the ellipsizing seems a bit wrong here....

I got a bit carried away with putting dots everywhere :)
2013-08-21 01:36:51 -04:00
Zbigniew Jędrzejewski-Szmek
cf40f0be1a logs-show: show source timestamp in verbose mode
This makes verbose behave like short mode, i.e. try to show
the source timestamp, and fall back to journald timestamp
only if unavailable or unparsable. I think verbose should
be like short, only showing more fields, and showing different
timestamps would be confusing.
2013-08-20 21:18:44 -04:00
Zbigniew Jędrzejewski-Szmek
f02d836794 logs-show: add short-precise mode with us timestamps
Also, always show us timestamps in verbose mode.

https://bugzilla.redhat.com/show_bug.cgi?id=991678
2013-08-20 21:18:43 -04:00
Zbigniew Jędrzejewski-Szmek
c51cf05646 Rename F_TYPE_CMP() to F_TYPE_EQUAL() 2013-08-20 21:18:43 -04:00
Zbigniew Jędrzejewski-Szmek
e7627e14dc keymap: add Pavilion dv7 keys 2013-08-20 21:18:43 -04:00
Zbigniew Jędrzejewski-Szmek
1291bc895b udev: when complaining about invalid characters, print them out
systemd-udevd[6260]: invalid key/value pair in file /usr/lib/udev/rules.d/60-ffado.rules on line 46,starting at character 84 ('#')
2013-08-20 21:18:43 -04:00
Zbigniew Jędrzejewski-Szmek
091526ab20 gpt-auto-generator: do not show error for non-GPT disks 2013-08-20 21:18:43 -04:00
Zbigniew Jędrzejewski-Szmek
7384146530 gpt-auto-generator: use _cleanup_ for blkid_free_probe 2013-08-20 21:18:43 -04:00
Zbigniew Jędrzejewski-Szmek
d98cc1c019 gpt-auto-generator: include device name in error reports 2013-08-20 21:18:43 -04:00
Zbigniew Jędrzejewski-Szmek
219061dc52 units: disable kmod-static-nodes.service in containers
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=998122.

Note: upstream kmod has a patch [1] to exit with a warning if
modules.devname is missing. We could use new %v specifier to make this
service conditional on the existence of this file, but this could
mask a kernel installation error, hence we should let kmod run
even if the file doesn't exist.

[1] http://git.kernel.org/cgit/utils/kernel/kmod/kmod.git/commit/?id=ae17710117
2013-08-20 21:18:00 -04:00
Zbigniew Jędrzejewski-Szmek
04ac799283 man: fix spacing issue in systemd-nspawn(1)
Same as 1e158d273.
2013-08-19 16:00:22 -04:00
Zbigniew Jędrzejewski-Szmek
58a25dac28 build-sys: use no-tmpl flavour of gtkdocization
"tmpl" flavour is deprecated. Also this way we avoid a warning during
installation with older gtkdoc.

https://bugzilla.gnome.org/show_bug.cgi?id=701259
2013-08-19 11:30:04 -04:00
Zbigniew Jędrzejewski-Szmek
ac50788b0f journal: fix parsing of facility in syslog messages
In 49998b383 (journald: do not overwrite syslog facility when
parsing priority) journald started ignoring facility part when
reading service stderr to convert to syslog messages. In this
case it is fine, because only the priority is allowed.

But the same codepath is used for syslog messages, where the
facility should be used. Split the two codepaths by explicitly
specyfing whether the facility should be ignored or not.

https://bugzilla.redhat.com/show_bug.cgi?id=988814
2013-08-19 11:14:14 -04:00
Harald Hoyer
763a24a3b6 libudev-enumerate.c:udev_enumerate_get_list_entry() fixed possible stale pointer
If a realloc() happens in syspath_add(), the move_later pointer could
point to an invalid memory region.

Let move_later store the array index, instead of the pointer to the
entry.
2013-08-19 15:21:49 +02:00
Kay Sievers
4bb3a126b7 udev: replace CAP_MKNOD by writable /sys condition 2013-08-17 19:07:42 +02:00
Michael Marineau
4b357e1587 build-sys: Add configure check for linux/btrfs.h
btrfs.h was added to uapi in Linux 3.9. To fix building with older
header versions this adds a configure check for the header and re-adds
btrfs definitions to missing.h which was removed in bed2e820 along with
two other ioctls used by gpt-auto-generator.

[ Apparently, btrfs.h was only added recently:
  http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=55e301fd57a6239ec14b91a1cf2e70b3dd135194
  let's re-add it for now -- kay ]
2013-08-16 23:29:41 +02:00
Zbigniew Jędrzejewski-Szmek
d0a2d726f0 units: make fsck units remain after exit
Without this, fsck would be re-run if any other service which pulls
in a target requiring one of the mounts was started after fsck was done
but before the initial transaction was done.

https://bugs.freedesktop.org/show_bug.cgi?id=66784
2013-08-15 15:42:09 -04:00
Thomas Hindoe Paaboel Andersen
5eec7de6ad typo fixes in man and comments 2013-08-15 23:38:09 +02:00
Thomas Hindoe Paaboel Andersen
998b087f70 tests: fix indentation 2013-08-15 23:33:01 +02:00
Kay Sievers
cabaa37a60 libudev: fix hwdb validation to look for the *new* file 2013-08-15 19:55:32 +02:00
Kay Sievers
47e737dc13 udevd: simplify sigterm check 2013-08-15 19:55:32 +02:00
Zbigniew Jędrzejewski-Szmek
f5853dafa1 build-sys: add clean-python target
Building for a different version of Python requires removing all
build products for the old version. There's no nice way to do it,
short of doing 'make clean'. The new 'clean-python' target is a
bit hacky, but seems to work:
  ./configure PYTHON=python2 && make && make install
  make clean-python
  ./configure PYTHON=python3 --disable-gtk-doc --disable-man-pages && make && make install
should install modules for both versions of Python.
2013-08-15 12:59:36 -04:00
Zbigniew Jędrzejewski-Szmek
31f49d022a systemd-python: check for oom, give nicer error messages 2013-08-15 12:59:36 -04:00
Steven Hiscocks
c2748ce28c systemd-python: fix initialization of _Reader objects
https://bugzilla.redhat.com/show_bug.cgi?id=995575
2013-08-15 12:59:36 -04:00
Kay Sievers
04bf3c1a60 sysctl: allow overwriting of values specified in "later" files 2013-08-15 18:43:31 +02:00
Kay Sievers
de562e00fe man: remove "wine" from unrelated man pages 2013-08-15 18:07:47 +02:00
Kay Sievers
2dd30e7da9 hwdb: keyboard - remove stray "
<dvdhrm> kay, hwdb/60-keyboard.hwdb line 147 it says KEYBOARD_KEY_ee=screenlock"
         with a " at the end. I guess that's a typo?
2013-08-15 17:51:02 +02:00
Kay Sievers
585275000c hashmap: remove empty lines 2013-08-15 17:51:02 +02:00
William Giokas
24a0282324 zsh_completion: Remove ctls function from _systemd
The _ctls function in the main _systemd file is not needed.
2013-08-15 11:29:09 -04:00
William Giokas
789b904a45 zsh_completion: machinectl properties can be stacked 2013-08-15 11:29:09 -04:00
William Giokas
298b9e23a6 zsh_completion: Allow specifying multiple arguments
Some of the options in systemd can take multiple arguments, such as
systemctl's --type option. Previously, you would only be able to
complete a single type after the -t, but now zsh will continue to
complete the types, separating them by commas.

systemd-inhibit's --what command has colon (:), and that has been taken
into account.
2013-08-15 11:29:08 -04:00
Ondrej Balaz
1acbb95c2b systemd-cryptsetup: makes “discard” a synonym for “allow-discards”
systemd-cryptsetup recognizes option 'allow-discards' in /etc/crypttab
to enable TRIM passthrough to underlying encrypted device. In Debian
this option was changed to 'discard' to avoid hyphen in option name.
(see: #648868 and `man crypttab`).

[zj: update crypttab(5) too, making "discard" the default.]
2013-08-14 22:54:07 -04:00
William Giokas
3e7f60ab32 zsh_completion: Move helper function to autoload
_hosts_or_user_at_host was used by 6 different completions, and
previously was in all 6 of those files. I moved it out to its own file,
_sd_hosts_or_user_at_host. This will be autoloaded for use in other
completion functions. It also allows external completions to use this
function by simply calling _sd_hosts_or_user_at_host as in the systemd
completions.
2013-08-14 22:42:56 -04:00
Michael Stapelberg
693093c6db systemd.unit(5): clarify the Description= contents 2013-08-14 22:38:09 -04:00
WANG Chao
01264ad1cc fstab-generator: log_oom() if automount_name is null 2013-08-14 22:38:09 -04:00