diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2015-11-08 14:12:54 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2015-11-10 19:33:06 -0500 |
commit | 36b4a7ba555540edb7648e0f97019280b4ac38de (patch) | |
tree | a00ff6d8304552e68e08e026d7f0c174cbed5746 /shell-completion/zsh | |
parent | e3c4a681db0b7004904b95d55fd1a443161c9397 (diff) |
Remove snapshot unit type
Snapshots were never useful or used for anything. Many systemd
developers that I spoke to at systemd.conf2015, didn't even know they
existed, so it is fairly safe to assume that this type can be deleted
without harm.
The fundamental problem with snapshots is that the state of the system
is dynamic, devices come and go, users log in and out, timers fire...
and restoring all units to some state from the past would "undo"
those changes, which isn't really possible.
Tested by creating a snapshot, running the new binary, and checking
that the transition did not cause errors, and the snapshot is gone,
and snapshots cannot be created anymore.
New systemctl says:
Unknown operation snapshot.
Old systemctl says:
Failed to create snapshot: Support for snapshots has been removed.
IgnoreOnSnaphost settings are warned about and ignored:
Support for option IgnoreOnSnapshot= has been removed and it is ignored
http://lists.freedesktop.org/archives/systemd-devel/2015-November/034872.html
Diffstat (limited to 'shell-completion/zsh')
-rw-r--r-- | shell-completion/zsh/_sd_unit_files | 2 | ||||
-rw-r--r-- | shell-completion/zsh/_systemctl.in | 11 |
2 files changed, 1 insertions, 12 deletions
diff --git a/shell-completion/zsh/_sd_unit_files b/shell-completion/zsh/_sd_unit_files index 4778a0420d..3e7a4ee803 100644 --- a/shell-completion/zsh/_sd_unit_files +++ b/shell-completion/zsh/_sd_unit_files @@ -5,5 +5,5 @@ _sd_unit_files() { files=( '*:files:->files' ) _description files expl 'unit file' - _files "$expl[@]" -g '*.(automount|busname|device|mount|path|service|snapshot|socket|swap|target|timer)' + _files "$expl[@]" -g '*.(automount|busname|device|mount|path|service|socket|swap|target|timer)' } diff --git a/shell-completion/zsh/_systemctl.in b/shell-completion/zsh/_systemctl.in index 96f51a0ee0..58c88c9d98 100644 --- a/shell-completion/zsh/_systemctl.in +++ b/shell-completion/zsh/_systemctl.in @@ -43,8 +43,6 @@ "is-enabled:Check whether unit files are enabled" "list-jobs:List jobs" "cancel:Cancel all, one, or more jobs" - "snapshot:Create a snapshot" - "delete:Remove one or more snapshots" "show-environment:Dump environment" "set-environment:Set one or more environment variables" "unset-environment:Unset one or more environment variables" @@ -268,14 +266,6 @@ done _message "no jobs found" } -# Completion functions for SNAPSHOTS -(( $+functions[_systemctl_delete] )) || _systemctl_delete() -{ - _wanted systemd-snapshots expl snapshot \ - compadd "$@" - ${${(f)"$(__systemctl list-units --type snapshot --all)"}%% *} || - _message "no snapshots found" -} - # Completion functions for TARGETS (( $+functions[_systemctl_set-default] )) || _systemctl_set-default() { @@ -310,7 +300,6 @@ done # [STANDALONE]='daemon-reexec daemon-reload default # emergency exit halt kexec list-jobs list-units # list-unit-files poweroff reboot rescue show-environment' -# [NAME]='snapshot' _systemctl_caching_policy() { |